はじめに
Qiita Markdown記法の「Code - コードの挿入」で指定すると文法強調 (シンタックスハイライト Syntax Highlighting)をしてくれる言語にはどんなものがあるのか、興味があったので調べてみました。
どこかで公開されているのかもしれませんが、みつけることができなかったので自力でまとめてみました。
一覧(2019/3/15に後述のyamlコードから抽出)
| 名称 | alias | filename | extension |
|---|---|---|---|
| 1C Enterprise | .bsl, .os | ||
| ABAP | .abap | ||
| ABNF | .abnf | ||
| AGS Script | ags | .asc, .ash | |
| AMPL | .ampl, .mod | ||
| ANTLR | .g4 | ||
| API Blueprint | .apib | ||
| APL | .apl, .dyalog | ||
| ASN.1 | .asn, .asn1 | ||
| ASP | aspx, aspx-vb | .asp, .asax, .ascx, .ashx, .asmx, .aspx, .axd |
|
| ATS | ats2 | .dats, .hats, .sats | |
| ActionScript | actionscript 3, actionscript3, as3 |
.as | |
| Ada | ada95, ada2005 | .adb, .ada, .ads | |
| Adobe Font Metrics | acfm, adobe composite font metrics, adobe multiple font metrics, amfm |
.afm | |
| Agda | .agda | ||
| Alloy | .als | ||
| Alpine Abuild | abuild, apkbuild | APKBUILD | |
| AngelScript | .as, .angelscript | ||
| Ant Build System | ant.xml, build.xml |
||
| ApacheConf | aconf, apache | .htaccess, apache2.conf, httpd.conf |
.apacheconf, .vhost |
| Apex | .cls | ||
| Apollo Guidance Computer | .agc | ||
| AppleScript | osascript | .applescript, .scpt | |
| Arc | .arc | ||
| AsciiDoc | .asciidoc, .adoc, .asc | ||
| AspectJ | .aj | ||
| Assembly | asm, nasm | .asm, .a51, .inc, .nasm | |
| Asymptote | .asy | ||
| Augeas | .aug | ||
| AutoHotkey | ahk | .ahk, .ahkl | |
| AutoIt | au3, AutoIt3, AutoItScript |
.au3 | |
| Awk | .awk, .auk, .gawk, .mawk, .nawk |
||
| Ballerina | .bal | ||
| Batchfile | bat, batch, dosbatch, winbatch |
.bat, .cmd | |
| Befunge | .befunge | ||
| Bison | .bison | ||
| BitBake | .bb | ||
| Blade | .blade, .blade.php | ||
| BlitzBasic | b3d, blitz3d, blitzplus, bplus |
.bb, .decls | |
| BlitzMax | bmax | .bmx | |
| Bluespec | .bsv | ||
| Boo | .boo | ||
| Brainfuck | .b, .bf | ||
| Brightscript | .brs | ||
| Bro | .bro | ||
| C | .c, .cats, .h, .idc | ||
| C# | csharp | .cs, .cake, .csx | |
| C++ | cpp | .cpp, .c++, .cc, .cp, .cxx, .h, .h++, .hh, .hpp, .hxx, .inc, .inl, .ino, .ipp, .re, .tcc, .tpp |
|
| C-ObjDump | .c-objdump | ||
| C2hs Haskell | c2hs | .chs | |
| CLIPS | .clp | ||
| CMake | CMakeLists.txt | .cmake, .cmake.in | |
| COBOL | .cob, .cbl, .ccp, .cobol, .cpy |
||
| COLLADA | .dae | ||
| CSON | .cson | ||
| CSS | .css | ||
| CSV | .csv | ||
| CWeb | .w | ||
| Cabal Config | Cabal | cabal.config, cabal.project |
.cabal |
| Cap'n Proto | .capnp | ||
| CartoCSS | Carto | .mss | |
| Ceylon | .ceylon | ||
| Chapel | chpl | .chpl | |
| Charity | .ch | ||
| ChucK | .ck | ||
| Cirru | .cirru | ||
| Clarion | .clw | ||
| Clean | .icl, .dcl | ||
| Click | .click | ||
| Clojure | riemann.config | .clj, .boot, .cl2, .cljc, .cljs, .cljs.hl, .cljscm, .cljx, .hic |
|
| Closure Templates | soy | .soy | |
| Cloud Firestore Security Rules | firestore.rules | ||
| CoNLL-U | CoNLL, CoNLL-X |
.conllu, .conll | |
| CoffeeScript | coffee, coffee-script |
Cakefile | .coffee, ._coffee, .cake, .cjsx, .iced |
| ColdFusion | cfm, cfml, coldfusion html |
.cfm, .cfml | |
| ColdFusion CFC | cfc | .cfc | |
| Common Lisp | lisp | .lisp, .asd, .cl, .l, .lsp, .ny, .podsl, .sexp |
|
| Common Workflow Language | cwl | .cwl | |
| Component Pascal | delphi, objectpascal |
.cp, .cps | |
| Cool | .cl | ||
| Coq | .coq, .v | ||
| Cpp-ObjDump | c++-objdump | .cppobjdump, .c++-objdump, .c++objdump, .cpp-objdump, .cxx-objdump |
|
| Creole | .creole | ||
| Crystal | .cr | ||
| Csound | csound-orc | .orc, .udo | |
| Csound Document | csound-csd | .csd | |
| Csound Score | csound-sco | .sco | |
| Cuda | .cu, .cuh | ||
| Cycript | .cy | ||
| Cython | pyrex | .pyx, .pxd, .pxi | |
| D | .d, .di | ||
| D-ObjDump | .d-objdump | ||
| DIGITAL Command Language | dcl | .com | |
| DM | byond | .dm | |
| DNS Zone | .zone, .arpa | ||
| DTrace | dtrace-script | .d | |
| Darcs Patch | dpatch | .darcspatch, .dpatch | |
| Dart | .dart | ||
| DataWeave | .dwl | ||
| Diff | udiff | .diff, .patch | |
| Dockerfile | Dockerfile | .dockerfile | |
| Dogescript | .djs | ||
| Dylan | .dylan, .dyl, .intr, .lid | ||
| E | .E | ||
| EBNF | .ebnf | ||
| ECL | .ecl, .eclxml | ||
| ECLiPSe | .ecl | ||
| EJS | .ejs | ||
| EML | .eml, .mbox | ||
| EQ | .eq | ||
| Eagle | .sch, .brd | ||
| Easybuild | .eb | ||
| Ecere Projects | .epj | ||
| EditorConfig | editor-config | .editorconfig | |
| Edje Data Collection | .edc | ||
| Eiffel | .e | ||
| Elixir | mix.lock | .ex, .exs | |
| Elm | .elm | ||
| Emacs Lisp | elisp, emacs | .abbrev_defs, .emacs, .emacs.desktop, .gnus, .spacemacs, .viper, Cask, Project.ede, _emacs, abbrev_defs |
.el, .emacs, .emacs.desktop |
| EmberScript | .em, .emberscript | ||
| Erlang | Emakefile, rebar.config, rebar.config.lock, rebar.lock |
.erl, .app.src, .es, .escript, .hrl, .xrl, .yrl |
|
| F# | fsharp | .fs, .fsi, .fsx | |
| F* | fstar | .fst | |
| FIGlet Font | FIGfont | .flf | |
| FLUX | .fx, .flux | ||
| Factor | .factor-boot-rc, .factor-rc |
.factor | |
| Fancy | Fakefile | .fy, .fancypack | |
| Fantom | .fan | ||
| Filebench WML | .f | ||
| Filterscript | .fs | ||
| Formatted | .for, .eam.fs | ||
| Forth | .fth, .4th, .f, .for, .forth, .fr, .frt, .fs |
||
| Fortran | .f90, .f, .f03, .f08, .f77, .f95, .for, .fpp |
||
| FreeMarker | ftl | .ftl | |
| Frege | .fr | ||
| G-code | .g, .gco, .gcode | ||
| GAMS | .gms | ||
| GAP | .g, .gap, .gd, .gi, .tst | ||
| GCC Machine Description | .md | ||
| GDB | .gdb, .gdbinit | ||
| GDScript | .gd | ||
| GLSL | .glsl, .fp, .frag, .frg, .fs,.fsh, .fshader, .geo, .geom, .glslv, .gshader, .shader, .tesc, .tese, .vert, .vrx, .vsh, .vshader |
||
| GN | .gn | .gn, .gni | |
| Game Maker Language | .gml | ||
| Genie | .gs | ||
| Genshi | xml+genshi, xml+kid |
.kid | |
| Gentoo Ebuild | .ebuild | ||
| Gentoo Eclass | .eclass | ||
| Gerber Image | rs-274x | .gbr, .gbl, .gbo, .gbp, .gbs, .gko, .gpb, .gpt, .gtl, .gto, .gtp, .gts |
|
| Gettext Catalog | pot | .po, .pot | |
| Gherkin | cucumber | .feature | |
| Git Attributes | gitattributes | .gitattributes | |
| Git Config | gitconfig, gitmodules |
.gitconfig, .gitmodules |
.gitconfig |
| Glyph | .glf | ||
| Glyph Bitmap Distribution Format | .bdf | ||
| Gnuplot | .gp, .gnu, .gnuplot, .plot, .plt |
||
| Go | golang | .go | |
| Golo | .golo | ||
| Gosu | .gs, .gst, .gsx, .vark | ||
| Grace | .grace | ||
| Gradle | .gradle | ||
| Grammatical Framework | gf | .gf | |
| Graph Modeling Language | .gml | ||
| GraphQL | .graphql, .gql | ||
| Graphviz (DOT) | .dot, .gv | ||
| Groovy | Jenkinsfile | .groovy, .grt, .gtpl, .gvy | |
| Groovy Server Pages | gsp, java server page |
.gsp | |
| HAProxy | haproxy.cfg | .cfg | |
| HCL | terraform | .hcl, .tf, .tfvars, .workflow | |
| HLSL | .hlsl, .cginc, .fx, .fxh, .hlsli | ||
| HTML | xhtml | .html, .htm, .html.hl, .inc, .st, .xht, .xhtml |
|
| HTML+Django | django, html+django/jinja, html+jinja, htmldjango, njk, nunjucks |
.jinja, .jinja2, .mustache, .njk |
|
| HTML+ECR | ecr | .ecr | |
| HTML+EEX | eex | .eex | |
| HTML+ERB | erb | .erb, .erb.deface | |
| HTML+PHP | .phtml | ||
| HTML+Razor | razor | .cshtml | |
| HTTP | .http | ||
| HXML | .hxml | ||
| Hack | .hh, .php | ||
| Haml | .haml, .haml.deface | ||
| Handlebars | hbs, htmlbars | .handlebars, .hbs | |
| Harbour | .hb | ||
| Haskell | .hs, .hsc | ||
| Haxe | .hx, .hxsl | ||
| HiveQL | .q | ||
| Hy | hylang | .hy | |
| HyPhy | .bf | ||
| IDL | .pro, .dlm | ||
| IGOR Pro | igor, igorpro | .ipf | |
| INI | dosini | buildozer.spec | .ini, .cfg, .lektorproject, .prefs, .pro, .properties |
| IRC log | irc, irc logs | .irclog, .weechatlog | |
| Idris | .idr, .lidr | ||
| Ignore List | ignore, gitignore, git-ignore |
.atomignore, .babelignore, .bzrignore, .coffeelintignore, .cvsignore, .dockerignore, .eslintignore, .gitignore, .nodemonignore, .npmignore, .prettierignore, .stylelintignore, .vscodeignore, gitignore-global, gitignore_global |
.gitignore |
| Inform 7 | i7, inform7 | .ni, .i7x | |
| Inno Setup | .iss | ||
| Io | .io | ||
| Ioke | .ik | ||
| Isabelle | .thy | ||
| Isabelle ROOT | ROOT | ||
| J | .ijs | ||
| JFlex | .flex, .jflex | ||
| JSON | .arcconfig, .htmlhintrc, .tern-config, .tern-project, .watchmanconfig, composer.lock, mcmod.info |
.json, .avsc, .geojson, .gltf, .har, .ice, .JSON-tmLanguage, .jsonl, .tfstate, .tfstate.backup, .topojson, .webapp, .webmanifest, .yy, .yyp |
|
| JSON with Comments | jsonc | .babelrc, .eslintrc.json, .jscsrc, .jshintrc, .jslintrc, jsconfig.json, tsconfig.json |
.sublime-build, .sublime-commands, .sublime-completions, .sublime-keymap, .sublime-macro, .sublime-menu, .sublime-mousemap, .sublime-project, .sublime-settings, .sublime-theme, .sublime-workspace, .sublime_metrics, .sublime_session |
| JSON5 | .json5 | ||
| JSONLD | .jsonld | ||
| JSONiq | .jq | ||
| JSX | .jsx | ||
| Jasmin | .j | ||
| Java | .java | ||
| Java Properties | .properties | ||
| Java Server Pages | jsp | .jsp | |
| JavaScript | js, node | Jakefile | .js, ._js, .bones, .es, .es6, .frag, .gs, .jake, .jsb, .jscad, .jsfl, .jsm, .jss, .mjs, .njs, .pac, .sjs, .ssjs, .xsjs, .xsjslib |
| Jison | .jison | ||
| Jison Lex | .jisonlex | ||
| Jolie | .ol, .iol | ||
| Jsonnet | .jsonnet, .libsonnet | ||
| Julia | .jl | ||
| Jupyter Notebook | IPython Notebook | Notebook | .ipynb |
| KRL | .krl | ||
| KiCad Layout | pcbnew | fp-lib-table | .kicad_pcb, .kicad_mod, .kicad_wks |
| KiCad Legacy Layout | .brd | ||
| KiCad Schematic | eeschema schematic | .sch | |
| Kit | .kit | ||
| Kotlin | .kt, .ktm, .kts | ||
| LFE | .lfe | ||
| LLVM | .ll | ||
| LOLCODE | .lol | ||
| LSL | .lsl, .lslp | ||
| LTspice Symbol | .asy | ||
| LabVIEW | .lvproj | ||
| Lasso | lassoscript | .lasso, .las, .lasso8, .lasso9, .ldml |
|
| Latte | .latte | ||
| Lean | .lean, .hlean | ||
| Less | .less | ||
| Lex | flex | .l, .lex | |
| LilyPond | .ly, .ily | ||
| Limbo | .b, .m | ||
| Linker Script | ld.script | .ld, .lds, .x | |
| Linux Kernel Module | .mod | ||
| Liquid | .liquid | ||
| Literate Agda | .lagda | ||
| Literate CoffeeScript | litcoffee | .litcoffee | |
| Literate Haskell | lhaskell, lhs | .lhs | |
| LiveScript | live-script, ls | Slakefile | .ls, ._ls |
| Logos | .xm, .x, .xi | ||
| Logtalk | .lgt, .logtalk | ||
| LookML | .lookml, .model.lkml, .view.lkml |
||
| LoomScript | .ls | ||
| Lua | .lua, .fcgi, .nse, .p8, .pd_lua, .rbxs, .wlua |
||
| M | mumps | .mumps, .m | |
| M4 | .m4 | ||
| M4Sugar | autoconf | configure.ac | .m4 |
| MATLAB | octave | .matlab, .m | |
| MAXScript | .ms, .mcr | ||
| MQL4 | .mq4, .mqh | ||
| MQL5 | .mq5, .mqh | ||
| MTML | .mtml | ||
| MUF | .muf, .m | ||
| Makefile | bsdmake, make, mf |
BSDmakefile, GNUmakefile, Kbuild, Makefile, Makefile.am, Makefile.boot, Makefile.frag, Makefile.in, Makefile.inc, Makefile.wat, makefile, makefile.sco, mkfile |
.mak, .d, .make, .mk, .mkfile |
| Mako | .mako, .mao | ||
| Markdown | pandoc | contents.lr | .md, .markdown, .mdown, .mdwn, .mdx, .mkd, .mkdn, .mkdown, .ronn, .workbook |
| Marko | markojs | .marko | |
| Mask | .mask | ||
| Mathematica | mma | .mathematica, .cdf, .m, .ma, .mt, .nb, .nbp, .wl, .wlt |
|
| Maven POM | pom.xml | ||
| Max | max/msp, maxmsp | .maxpat, .maxhelp, .maxproj, .mxt, .pat |
|
| MediaWiki | .mediawiki, .wiki | ||
| Mercury | .m, .moo | ||
| Meson | meson.build, meson_options.txt |
||
| Metal | .metal | ||
| MiniD | .minid | ||
| Mirah | .druby, .duby, .mirah | ||
| Modelica | .mo | ||
| Modula-2 | .mod | ||
| Modula-3 | .i3, .ig, .m3, .mg | ||
| Module Management System | descrip.mmk, descrip.mms |
.mms, .mmk | |
| Monkey | .monkey, .monkey2 | ||
| Moocode | .moo | ||
| MoonScript | .moon | ||
| Myghty | .myt | ||
| NCL | .ncl | ||
| NL | .nl | ||
| NSIS | .nsi, .nsh | ||
| Nearley | .ne, .nearley | ||
| Nemerle | .n | ||
| NetLinx | .axs, .axi | ||
| NetLinx+ERB | .axs.erb, .axi.erb | ||
| NetLogo | .nlogo | ||
| NewLisp | .nl, .lisp, .lsp | ||
| Nextflow | nextflow.config | .nf | |
| Nginx | nginx configuration file | nginx.conf | .nginxconf, .vhost |
| Nim | nim.cfg | .nim, .nim.cfg, .nimble, .nimrod, .nims |
|
| Ninja | .ninja | ||
| Nit | .nit | ||
| Nix | nixos | .nix | |
| Nu | nush | Nukefile | .nu |
| NumPy | .numpy, .numpyw, .numsc | ||
| OCaml | .ml, .eliom, .eliomi, .ml4, .mli, .mll, .mly |
||
| ObjDump | .objdump | ||
| Objective-C | obj-c, objc, objectivec |
.m, .h | |
| Objective-C++ | obj-c++, objc++, objectivec++ |
.mm | |
| Objective-J | obj-j, objectivej, objj |
.j, .sj | |
| Omgrofl | .omgrofl | ||
| Opa | .opa | ||
| Opal | .opal | ||
| OpenCL | .cl, .opencl | ||
| OpenEdge ABL | progress, openedge, abl |
.p, .cls, .w | |
| OpenRC runscript | openrc | ||
| OpenSCAD | .scad | ||
| OpenType Feature File | AFDKO | .fea | |
| Org | .org | ||
| Ox | .ox, .oxh, .oxo | ||
| Oxygene | .oxygene | ||
| Oz | .oz | ||
| P4 | .p4 | ||
| PHP | inc | .php, .php_cs, .php_cs.dist, Phakefile |
.php, .aw, .ctp, .fcgi, .inc, .php3, .php4, .php5, .phps, .phpt |
| PLSQL | .pls, .bdy, .ddl, .fnc, .pck, .pkb, .pks, .plb, .plsql, .prc, .spc, .sql, .tpb, .tps, .trg, .vw |
||
| PLpgSQL | .pgsql, .sql | ||
| POV-Ray SDL | pov-ray, povray | .pov, .inc | |
| Pan | .pan | ||
| Papyrus | .psc | ||
| Parrot | .parrot | ||
| Parrot Assembly | pasm | .pasm | |
| Parrot Internal Representation | pir | .pir | |
| Pascal | .pas, .dfm, .dpr, .inc, .lpr, .pascal, .pp |
||
| Pawn | .pwn, .inc | ||
| Pep8 | .pep | ||
| Perl | cperl | Makefile.PL, Rexfile, ack, cpanfile |
.pl, .al, .cgi, .fcgi, .perl, .ph, .plx, .pm, .psgi, .t |
| Perl 6 | perl6 | .6pl, .6pm, .nqp, .p6, .p6l, .p6m, .pl, .pl6, .pm, .pm6, .t |
|
| Pic | .pic, .chem | ||
| Pickle | .pkl | ||
| PicoLisp | .l | ||
| PigLatin | .pig | ||
| Pike | .pike, .pmod | ||
| Pod | .pod | ||
| Pod 6 | .pod, .pod6 | ||
| PogoScript | .pogo | ||
| Pony | .pony | ||
| PostCSS | .pcss | ||
| PostScript | postscr | .ps, .eps, .pfa | |
| PowerBuilder | .pbt, .sra, .sru, .srw | ||
| PowerShell | posh, pwsh | .ps1, .psd1, .psm1 | |
| Processing | .pde | ||
| Prolog | .pl, .pro, .prolog, .yap | ||
| Propeller Spin | .spin | ||
| Protocol Buffer | protobuf, Protocol Buffers |
.proto | |
| Public Key | .asc, .pub | ||
| Pug | .jade, .pug | ||
| Puppet | Modulefile | .pp | |
| Pure Data | .pd | ||
| PureBasic | .pb, .pbi | ||
| PureScript | .purs | ||
| Python | rusthon, python3 |
.gclient, BUCK, BUILD, BUILD.bazel, SConscript, SConstruct, Snakefile, WORKSPACE, wscript |
.py, .bzl, .cgi, .fcgi, .gyp, .gypi, .lmi, .py3, .pyde, .pyi, .pyp, .pyt, .pyw, .rpy, .spec, .tac, .wsgi, .xpy |
| Python console | pycon | ||
| Python traceback | .pytb | ||
| QML | .qml, .qbs | ||
| QMake | .pro, .pri | ||
| Quake | m3makefile, m3overrides |
||
| R | R, Rscript, splus |
.Rprofile, expr-dist |
.r, .rd, .rsx |
| RAML | .raml | ||
| RDoc | .rdoc | ||
| REALbasic | .rbbas, .rbfrm, .rbmnu, .rbres, .rbtbar, .rbuistate |
||
| REXX | arexx | .rexx, .pprx, .rex | |
| RHTML | html+ruby | .rhtml | |
| RMarkdown | .rmd | ||
| RPC | rpcgen, oncrpc, xdr |
.x | |
| RPM Spec | specfile | .spec | |
| RUNOFF | .rnh, .rno | ||
| Racket | .rkt, .rktd, .rktl, .scrbl | ||
| Ragel | ragel-rb, ragel-ruby |
.rl | |
| Rascal | .rsc | ||
| Raw token data | raw | .raw | |
| Reason | .re, .rei | ||
| Rebol | .reb, .r, .r2, .r3, .rebol | ||
| Red | red/system | .red, .reds | |
| Redcode | .cw | ||
| Regular Expression | regexp, regex | .regexp, .regex | |
| Ren'Py | renpy | .rpy | |
| RenderScript | .rs, .rsh | ||
| Rich Text Format | .rtf | ||
| Ring | .ring | ||
| RobotFramework | .robot | ||
| Roff | groff, man, manpage, man page, man-page, mdoc, nroff, troff |
mmn, mmt | .roff, .1, .1in, .1m, .1x, .2, .3, .3in, .3m, .3p, .3pm, .3qt, .3x, .4, .5, .6, .7, .8, .9, .l, .man, .mdoc, .me, .ms, .n, .nr, .rno, .tmac |
| Roff Manpage | .1, .1in, .1m, .1x, .2,.3, .3in, .3m, .3p, .3pm, .3qt, .3x, .4, .5, .6, .7, .8, .9, .man, .mdoc |
||
| Rouge | .rg | ||
| Ruby | jruby, macruby, rake, rb, rbx |
.irbrc, .pryrc, Appraisals, Berksfile, Brewfile, Buildfile, Capfile, Dangerfile, Deliverfile, Fastfile, Gemfile, Gemfile.lock, Guardfile, Jarfile, Mavenfile, Podfile, Puppetfile, Rakefile, Snapfile, Thorfile, Vagrantfile, buildfile |
.rb, .builder, .eye, .fcgi, .gemspec, .god, .jbuilder, .mspec, .pluginspec, .podspec, .rabl, .rake, .rbuild, .rbw, .rbx, .ru, .ruby, .spec, .thor, .watchr |
| Rust | .rs, .rs.in | ||
| SAS | .sas | ||
| SCSS | .scss | ||
| SMT | .smt2, .smt | ||
| SPARQL | .sparql, .rq | ||
| SQF | .sqf, .hqf | ||
| SQL | .sql, .cql, .ddl, .inc, .mysql, .prc, .tab, .udf, .viw |
||
| SQLPL | .sql, .db2 | ||
| SRecode Template | .srt | ||
| STON | .ston | ||
| SVG | .svg | ||
| Sage | .sage, .sagews | ||
| SaltStack | saltstate, salt | .sls | |
| Sass | .sass | ||
| Scala | .scala, .kojo, .sbt, .sc |
||
| Scaml | .scaml | ||
| Scheme | .scm, .sch, .sld, .sls, .sps, .ss | ||
| Scilab | .sci, .sce, .tst | ||
| Self | .self | ||
| ShaderLab | .shader | ||
| Shell | sh, shell-script, bash, zsh |
.bash_aliases, .bash_history, .bash_logout, .bash_profile, .bashrc, .cshrc, .login, .profile, .zlogin, .zlogout, .zprofile, .zshenv, .zshrc, 9fs, PKGBUILD, bash_aliases, bash_logout, bash_profile, bashrc, cshrc, gradlew, login, man, profile, zlogin, zlogout, zprofile, zshenv, zshrc |
.sh, .bash, .bats, .cgi, .command, fcgi, .ksh, .sh.in, .tmux, .tool, .zsh |
| ShellSession | bash session, console |
.sh-session | |
| Shen | .shen | ||
| Slash | .sl | ||
| Slice | .ice | ||
| Slim | .slim | ||
| Smali | .smali | ||
| Smalltalk | squeak | .st, .cs | |
| Smarty | .tpl | ||
| Solidity | |||
| SourcePawn | sourcemod | .sp, .inc, .sma | |
| Spline Font Database | .sfd | ||
| Squirrel | .nut | ||
| Stan | .stan | ||
| Standard ML | sml | .ML, .fun, .sig, .sml | |
| Stata | .do, .ado, .doh, .ihlp, .mata, .matah, .sthlp |
||
| Stylus | .styl | ||
| SubRip Text | .srt | ||
| SugarSS | .sss | ||
| SuperCollider | .sc, .scd | ||
| Swift | .swift | ||
| SystemVerilog | .sv, .svh, .vh | ||
| TI Program | .8xp, .8xk, .8xk.txt, .8xp.txt | ||
| TLA | .tla | ||
| TOML | Cargo.lock, Gopkg.lock |
.toml | |
| TXL | .txl | ||
| Tcl | owh, starfield | .tcl, .adp, .tm | |
| Tcsh | .tcsh, .csh | ||
| TeX | latex | .tex, .aux, .bbx, .bib, .cbx, .cls, .dtx, .ins, .lbx, .ltx, .mkii, .mkiv, .mkvi, .sty, .toc |
|
| Tea | .tea | ||
| Terra | .t | ||
| Text | fundamental | COPYING, COPYING.regex, COPYRIGHT.regex, FONTLOG, INSTALL, INSTALL.mysql, LICENSE, LICENSE.mysql, NEWS, README.1ST, README.me, README.mysql, click.me, delete.me, go.mod, go.sum, keep.me, read.me, readme.1st, test.me |
.txt, .fr, .nb, .ncl, .no |
| Textile | .textile | ||
| Thrift | .thrift | ||
| Turing | .t, .tu | ||
| Turtle | .ttl | ||
| Twig | .twig | ||
| Type Language | tl | .tl | |
| TypeScript | ts | .ts, .tsx | |
| Unified Parallel C | .upc | ||
| Unity3D Asset | .anim, .asset, .mat, .meta, .prefab, .unity |
||
| Unix Assembly | .s, .ms | ||
| Uno | .uno | ||
| UnrealScript | .uc | ||
| UrWeb | Ur/Web, Ur | .ur, .urs | |
| VCL | .vcl | ||
| VHDL | .vhdl, .vhd, .vhf, .vhi, .vho, .vhs, .vht, .vhw |
||
| Vala | .vala, .vapi | ||
| Verilog | .v, .veo | ||
| Vim script | vim, viml, nvim |
.gvimrc, .nvimrc, .vimrc, _vimrc, gvimrc, nvimrc, vimrc |
.vim, .vba, .vmb |
| Visual Basic | vb.net, vbnet | .vb, .bas, .cls, .frm, .frx, .vba, .vbhtml, .vbs |
|
| Volt | .volt | ||
| Vue | .vue | ||
| Wavefront Material | .mtl | ||
| Wavefront Object | .obj | ||
| Web Ontology Language | .owl | ||
| WebAssembly | wast, wasm | .wast, .wat | |
| WebIDL | .webidl | ||
| Windows Registry Entries | .reg | ||
| World of Warcraft Addon Data | .toc | ||
| X BitMap | xbm | .xbm | |
| X Font Directory Index | encodings.dir, fonts.alias, fonts.dir, fonts.scale |
||
| X PixMap | xpm | .xpm, .pm | |
| X10 | xten | .x10 | |
| XC | .xc | ||
| XCompose | .XCompose, XCompose, xcompose |
||
| XML | rss, xsd, wsdl | .classpath, .cproject, .project, App.config, NuGet.config, Settings.StyleCop, Web.Debug.config, Web.Release.config, Web.config, packages.config |
.xml, .adml, .admx, .ant, .axml, .builds, .ccproj, .ccxml, .clixml, .cproject, .cscfg, .csdef, .csl, .csproj, .ct, .depproj, .dita, .ditamap, .ditaval, .dll.config, .dotsettings, .filters, .fsproj, .fxml, .glade, .gml, .gmx, .grxml, .iml, .ivy, .jelly, .jsproj, .kml, .launch, .mdpolicy, .mjml, .mm, .mod, .mxml, .natvis, .ncl, .ndproj, .nproj, .nuspec, .odd, .osm, .pkgproj, .plist, .pluginspec, .proj, .props, .ps1xml, .psc1, .pt, .rdf, .resx, .rss, .sch, .scxml, .sfproj, .shproj, .srdf, .storyboard, .stTheme, .sublime-snippet, .targets, .tmCommand, .tml, .tmLanguage, .tmPreferences, .tmSnippet, .tmTheme, .ts, .tsx, .ui, .urdf, .ux, .vbproj, vcxproj, .vsixmanifest, .vssettings, .vstemplate, .vxml, .wixproj, .workflow, .wsdl, .wsf, .wxi, .wxl, .wxs, .x3d, .xacro, .xaml, .xib, .xlf, .xliff, .xmi, .xml.dist, .xproj, .xsd, .xspec, .xul, .zcml |
| XPages | .xsp-config, .xsp.metadata |
||
| XProc | .xpl, .xproc | ||
| XQuery | .xquery, .xq, .xql, .xqm, .xqy |
||
| XS | .xs | ||
| XSLT | xsl | .xslt, .xsl | |
| Xojo | .xojo_code, .xojo_menu, .xojo_report, .xojo_script, .xojo_toolbar, .xojo_window |
||
| Xtend | .xtend | ||
| YAML | yml | .clang-format, .clang-tidy, .gemrc, glide.lock |
.yml, .mir, .reek, .rviz, .sublime-syntax, .syntax, .yaml, .yaml-tmlanguage, .yml.mysql |
| YANG | .yang | ||
| YARA | .yar, .yara | ||
| YASnippet | snippet, yas | .yasnippet | |
| Yacc | .y, .yacc, .yy | ||
| Zephir | .zep | ||
| Zig | .zig | ||
| Zimpl | .zimpl, .zmpl, .zpl | ||
| desktop | .desktop, .desktop.in |
||
| eC | .ec, .eh | ||
| edn | .edn | ||
| fish | .fish | ||
| mcfunction | .mcfunction | ||
| mupad | .mu | ||
| nanorc | .nanorc, nanorc |
.nanorc | |
| nesC | .nc | ||
| ooc | .ooc | ||
| q | .q | ||
| reStructuredText | rst | .rst, .rest, .rest.txt, .rst.txt | |
| sed | .sed | ||
| wdl | .wdl | ||
| wisp | .wisp | ||
| xBase | advpl, clipper, foxpro |
.prg, .ch, .prw |
情報源および一覧生成コード
Markdown記法 チートシート に「コードに関する記法はGitHub Flavored Markdownに準拠しています。」と記載されていましたので、https://github.com/github/linguist/blob/master/lib/linguist/languages.ymlを参照して抜き出しました。
少々恥ずかしいですが(引数チェックなど何も入れていないです...)、上記から一覧HTMLを生成したコードを晒します。実用に耐える本格的なYAMLの解析コードをいずれば作成してみたいです。
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var output = string.Concat(EnumerateHtmlTableRows(args[0]).ToArray());
Console.Write(output);
}
static IEnumerable<string> EnumerateHtmlTableRows(string filePath)
{
var langName = string.Empty;
var aliases = new List<string>();
var fileNames = new List<string>();
var extensions = new List<string>();
var mode = string.Empty;
foreach(var v in System.IO.File.ReadAllLines(filePath))
{
if (v.Length == 0)
continue;
if(v[0] == '#')
continue;
if (v[0] == '-')
continue;
if (v[0] != ' ')
{
if(langName != string.Empty)
yield return GetHtmlTableRows(langName, aliases, fileNames, extensions);
langName = v;
aliases.Clear();
fileNames.Clear();
extensions.Clear();
mode = string.Empty;
continue;
}
var mtMode = System.Text.RegularExpressions.Regex.Match(v, @"^ +(.*):");
if (mtMode.Success)
{
mode = mtMode.Groups[1].Value;
continue;
}
var mtValue = System.Text.RegularExpressions.Regex.Match(v, @"^ +[-] +(.*)");
if (mtValue.Success)
{
switch (mode)
{
case "aliases":
aliases.Add(mtValue.Groups[1].Value.Trim(new char[] { '\"' }));
break;
case "extensions":
extensions.Add(mtValue.Groups[1].Value.Trim(new char[] { '\"'}));
break;
case "filenames":
fileNames.Add(mtValue.Groups[1].Value.Trim(new char[] { '\"' }));
break;
}
}
}
yield return GetHtmlTableRow(langName, aliases, fileNames, extensions);
}
static string GetHtmlTableRow(string langName, List<string> aliases, List<string> extensions, List<string> fileNames)
{
return string.Format("<tr><th>{0}</th><td>{1}</td><td>{2}</td><td>{3}</td></tr>\r\n", langName, string.Join(", ", aliases), string.Join(", ", extensions), string.Join(", ", fileNames));
}
}
}

