La bibliothèque pygments.rb est un wrapper Ruby pour pygments, un syntax highlighter écrit en Python. J’ai cherché une liste des abréviations supportées par l’application, sans la trouver. Je suis étonné qu’une telle liste n’existe pas. J’ai peut-être mal cherché… Quoiqu’il en soit voici cette liste, elle sera peut-être utile à quelqu’un d’autre:

ABAP                      ["abap"]
ANTLR                     ["antlr"]
ANTLR With ActionScript Target ["antlr-as", "antlr-actionscript"]
ANTLR With C# Target      ["antlr-csharp", "antlr-c#"]
ANTLR With CPP Target     ["antlr-cpp"]
ANTLR With Java Target    ["antlr-java"]
ANTLR With ObjectiveC Target ["antlr-objc"]
ANTLR With Perl Target    ["antlr-perl"]
ANTLR With Python Target  ["antlr-python"]
ANTLR With Ruby Target    ["antlr-ruby", "antlr-rb"]
ActionScript              ["as", "actionscript"]
ActionScript 3            ["as3", "actionscript3"]
Ada                       ["ada", "ada95ada2005"]
ApacheConf                ["apacheconf", "aconf", "apache"]
AppleScript               ["applescript"]
AspectJ                   ["aspectj"]
Asymptote                 ["asy", "asymptote"]
Awk                       ["awk", "gawk", "mawk", "nawk"]
BBCode                    ["bbcode"]
BUGS                      ["bugs", "winbugs", "openbugs"]
Base Makefile             ["basemake"]
Bash                      ["bash", "sh", "ksh"]
Bash Session              ["console"]
Batchfile                 ["bat"]
Befunge                   ["befunge"]
BlitzMax                  ["blitzmax", "bmax"]
Boo                       ["boo"]
Brainfuck                 ["brainfuck", "bf"]
Bro                       ["bro"]
C                         ["c"]
C#                        ["csharp", "c#"]
C++                       ["cpp", "c++"]
CFEngine3                 ["cfengine3", "cf3"]
CMake                     ["cmake"]
CSS                       ["css"]
CSS+Django/Jinja          ["css+django", "css+jinja"]
CSS+Genshi Text           ["css+genshitext", "css+genshi"]
CSS+Lasso                 ["css+lasso"]
CSS+Mako                  ["css+mako"]
CSS+Myghty                ["css+myghty"]
CSS+PHP                   ["css+php"]
CSS+Ruby                  ["css+erb", "css+ruby"]
CSS+Smarty                ["css+smarty"]
CUDA                      ["cuda", "cu"]
Ceylon                    ["ceylon"]
Cheetah                   ["cheetah", "spitfire"]
Clojure                   ["clojure", "clj"]
CoffeeScript              ["coffee-script", "coffeescript"]
Coldfusion HTML           ["cfm"]
Common Lisp               ["common-lisp", "cl"]
Coq                       ["coq"]
Croc                      ["croc"]
Cython                    ["cython", "pyx"]
D                         ["d"]
DTD                       ["dtd"]
Darcs Patch               ["dpatch"]
Dart                      ["dart"]
Debian Control file       ["control"]
Debian Sourcelist         ["sourceslist", "sources.list"]
Delphi                    ["delphi", "pas", "pascal", "objectpascal"]
Diff                      ["diff", "udiff"]
Django/Jinja              ["django", "jinja"]
Duel                      ["duel", "Duel Engine", "Duel View", "JBST", "jbst", "JsonML+BST"]
Dylan                     ["dylan"]
ECL                       ["ecl"]
ERB                       ["erb"]
Elixir                    ["elixir", "ex", "exs"]
Elixir iex session        ["iex"]
Embedded Ragel            ["ragel-em"]
Erlang                    ["erlang"]
Erlang erl session        ["erl"]
Evoque                    ["evoque"]
FSharp                    ["fsharp"]
Factor                    ["factor"]
Fancy                     ["fancy", "fy"]
Fantom                    ["fan"]
Felix                     ["felix", "flx"]
Fortran                   ["fortran"]
GAS                       ["gas"]
GLSL                      ["glsl"]
Genshi                    ["genshi", "kid", "xml+genshi", "xml+kid"]
Genshi Text               ["genshitext"]
Gettext Catalog           ["pot", "po"]
Gherkin                   ["Cucumber", "cucumber", "Gherkin", "gherkin"]
Gnuplot                   ["gnuplot"]
Go                        ["go"]
GoodData-CL               ["gooddata-cl"]
Gosu                      ["gosu"]
Gosu Template             ["gst"]
Groff                     ["groff", "nroff", "man"]
Groovy                    ["groovy"]
HTML                      ["html"]
HTML+Cheetah              ["html+cheetah", "html+spitfire"]
HTML+Django/Jinja         ["html+django", "html+jinja"]
HTML+Evoque               ["html+evoque"]
HTML+Genshi               ["html+genshi", "html+kid"]
HTML+Lasso                ["html+lasso"]
HTML+Mako                 ["html+mako"]
HTML+Myghty               ["html+myghty"]
HTML+PHP                  ["html+php"]
HTML+Smarty               ["html+smarty"]
HTML+Velocity             ["html+velocity"]
HTTP                      ["http"]
Haml                      ["haml", "HAML"]
Haskell                   ["haskell", "hs"]
Hybris                    ["hybris", "hy"]
INI                       ["ini", "cfg"]
IRC logs                  ["irc"]
Io                        ["io"]
Ioke                      ["ioke", "ik"]
JAGS                      ["jags"]
JSON                      ["json"]
Jade                      ["jade", "JADE"]
Java                      ["java"]
Java Server Page          ["jsp"]
JavaScript                ["js", "javascript"]
JavaScript+Cheetah        ["js+cheetah", "javascript+cheetah", "js+spitfire", "javascript+spitfire"]
JavaScript+Django/Jinja   ["js+django", "javascript+django", "js+jinja", "javascript+jinja"]
JavaScript+Genshi Text    ["js+genshitext", "js+genshi", "javascript+genshitext", "javascript+genshi"]
JavaScript+Lasso          ["js+lasso", "javascript+lasso"]
JavaScript+Mako           ["js+mako", "javascript+mako"]
JavaScript+Myghty         ["js+myghty", "javascript+myghty"]
JavaScript+PHP            ["js+php", "javascript+php"]
JavaScript+Ruby           ["js+erb", "javascript+erb", "js+ruby", "javascript+ruby"]
JavaScript+Smarty         ["js+smarty", "javascript+smarty"]
Julia                     ["julia", "jl"]
Julia console             ["jlcon"]
Kconfig                   ["kconfig", "menuconfig", "linux-config", "kernel-config"]
Koka                      ["koka"]
Kotlin                    ["kotlin"]
LLVM                      ["llvm"]
Lasso                     ["lasso", "lassoscript"]
Lighttpd configuration file ["lighty", "lighttpd"]
Literate Haskell          ["lhs", "literate-haskell"]
LiveScript                ["live-script", "livescript"]
Logtalk                   ["logtalk"]
Lua                       ["lua"]
MAQL                      ["maql"]
MOOCode                   ["moocode"]
MXML                      ["mxml"]
Makefile                  ["make", "makefile", "mf", "bsdmake"]
Mako                      ["mako"]
Mason                     ["mason"]
Matlab                    ["matlab"]
Matlab session            ["matlabsession"]
MiniD                     ["minid"]
Modelica                  ["modelica"]
Modula-2                  ["modula2", "m2"]
MoinMoin/Trac Wiki markup ["trac-wiki", "moin"]
Monkey                    ["monkey"]
MoonScript                ["moon", "moonscript"]
Mscgen                    ["mscgen", "msc"]
MuPAD                     ["mupad"]
MySQL                     ["mysql"]
Myghty                    ["myghty"]
NASM                      ["nasm"]
Nemerle                   ["nemerle"]
NewLisp                   ["newlisp"]
Newspeak                  ["newspeak"]
Nginx configuration file  ["nginx"]
Nimrod                    ["nimrod", "nim"]
NumPy                     ["numpy"]
OCaml                     ["ocaml"]
Objective-C               ["objective-c", "objectivec", "obj-c", "objc"]
Objective-J               ["objective-j", "objectivej", "obj-j", "objj"]
Octave                    ["octave"]
Ooc                       ["ooc"]
Opa                       ["opa"]
OpenEdge ABL              ["openedge", "abl", "progress"]
PHP                       ["php", "php3", "php4", "php5"]
PL/pgSQL                  ["plpgsql"]
POVRay                    ["pov"]
Perl                      ["perl", "pl"]
PostScript                ["postscript"]
PostgreSQL SQL dialect    ["postgresql", "postgres"]
PostgreSQL console (psql) ["psql", "postgresql-console", "postgres-console"]
PowerShell                ["powershell", "posh", "ps1"]
Prolog                    ["prolog"]
Properties                ["properties"]
Protocol Buffer           ["protobuf"]
PyPy Log                  ["pypylog", "pypy"]
Python                    ["python", "py", "sage"]
Python 3                  ["python3", "py3"]
Python 3.0 Traceback      ["py3tb"]
Python Traceback          ["pytb"]
Python console session    ["pycon"]
RConsole                  ["rconsole", "rout"]
REBOL                     ["rebol"]
RHTML                     ["rhtml", "html+erb", "html+ruby"]
Racket                    ["racket", "rkt"]
Ragel                     ["ragel"]
Ragel in C Host           ["ragel-c"]
Ragel in CPP Host         ["ragel-cpp"]
Ragel in D Host           ["ragel-d"]
Ragel in Java Host        ["ragel-java"]
Ragel in Objective C Host ["ragel-objc"]
Ragel in Ruby Host        ["ragel-ruby", "ragel-rb"]
Raw token data            ["raw"]
Rd                        ["rd"]
Redcode                   ["redcode"]
RobotFramework            ["RobotFramework", "robotframework"]
Ruby                      ["rb", "ruby", "duby"]
Ruby irb session          ["rbcon", "irb"]
Rust                      ["rust"]
S                         ["splus", "s", "r"]
SCSS                      ["scss"]
SQL                       ["sql"]
Sass                      ["sass", "SASS"]
Scala                     ["scala"]
Scalate Server Page       ["ssp"]
Scaml                     ["scaml", "SCAML"]
Scheme                    ["scheme", "scm"]
Scilab                    ["scilab"]
Smali                     ["smali"]
Smalltalk                 ["smalltalk", "squeak"]
Smarty                    ["smarty"]
Snobol                    ["snobol"]
SourcePawn                ["sp"]
SquidConf                 ["squidconf", "squid.conf", "squid"]
Stan                      ["stan"]
Standard ML               ["sml"]
Tcl                       ["tcl"]
Tcsh                      ["tcsh", "csh"]
TeX                       ["tex", "latex"]
Tea                       ["tea"]
Text only                 ["text"]
Treetop                   ["treetop"]
UrbiScript                ["urbiscript"]
VB.net                    ["vb.net", "vbnet"]
VGL                       ["vgl"]
Vala                      ["vala", "vapi"]
Velocity                  ["velocity"]
VimL                      ["vim"]
XML                       ["xml"]
XML+Cheetah               ["xml+cheetah", "xml+spitfire"]
XML+Django/Jinja          ["xml+django", "xml+jinja"]
XML+Evoque                ["xml+evoque"]
XML+Lasso                 ["xml+lasso"]
XML+Mako                  ["xml+mako"]
XML+PHP                   ["xml+php"]
XML+Ruby                  ["xml+erb", "xml+ruby"]
XML+Smarty                ["xml+smarty"]
XML+Velocity              ["xml+velocity"]
XQuery                    ["xquery", "xqy", "xq", "xql", "xqm"]
XSLT                      ["xslt"]
Xtend                     ["xtend"]
YAML                      ["yaml"]
aspx-cs                   ["aspx-cs"]
aspx-vb                   ["aspx-vb"]
autohotkey                ["ahk"]
c-objdump                 ["c-objdump"]
cfstatement               ["cfs"]
cpp-objdump               ["cpp-objdump", "c++-objdumb", "cxx-objdump"]
d-objdump                 ["d-objdump"]
dg                        ["dg"]
eC                        ["ec"]
haXe                      ["hx", "haXe"]
objdump                   ["objdump"]
reStructuredText          ["rst", "rest", "restructuredtext"]
reg                       []
sqlite3con                ["sqlite3"]
systemverilog             ["sv"]
verilog                   ["v"]
vhdl                      ["vhdl"]

Et pour les curieux, voici comment l’obtenir:

require 'pygments'

Pygments.lexers.sort.each do |e|
  puts "%-25s " % e[1][:name] + "#{e[1][:aliases]}"
end

À demain.