Supported languages¶
Pygments supports an ever-growing range of languages. Watch this space…
Programming languages¶
Agda (incl. literate)
Assembly (various)
Croc (MiniD)
Cryptol (incl. Literate Cryptol)
DCPU-16
Dylan (incl. console)
Email
Erlang (incl. shell sessions)
Gherkin (Cucumber)
GLSL shaders
GnuCOBOL (OpenCOBOL)
Haskell (incl. Literate Haskell)
HLSL shaders
Idris (incl. Literate Idris)
Lasso (incl. templating)
Python 2.x and 3.x (incl. console sessions and tracebacks)
Raku a.k.a. Perl 6
Ruby (incl. irb sessions)
S, S-Plus, R
Verilog, SystemVerilog
Template languages¶
Other markup¶
Apache config files
Apache Pig
BBCode
CapDL
CMake
Csound scores
CSS
Debian control files
Diff files
Dockerfiles
DTD
EBNF
E-mail headers
Extempore
Flatline
Gettext catalogs
Gnuplot script
Groff markup
Hexdumps
HTML
HTTP sessions
IDL
Inform
INI-style config files
IRC logs (irssi style)
Isabelle
JSGF notation
JSON, JSON-LD
Lean theorem prover
Lighttpd config files
Linux kernel log (dmesg)
LLVM assembly
LSL scripts
Makefiles
MoinMoin/Trac Wiki markup
MQL
MySQL
NCAR command language
Nginx config files
NSIS scripts
Notmuch
POV-Ray scenes
QML
Ragel
Redcode
ReST
Robot Framework
RPM spec files
Rql
RSL
Scdoc
Sieve
Singularity
SPARQL
SQL, also MySQL, SQLite
Squid configuration
TADS 3
Terraform
TeX
Treetop grammars
USD (Universal Scene Description)
Varnish configs
VGL
Vim Script
WDiff
Web IDL
Windows batch files
XML
XSLT
YAML
YANG
Windows Registry files
Interactive terminal/shell sessions¶
To highlight an interactive terminal or shell session, prefix your code snippet with a specially formatted prompt.
Supported shells with examples are shown below. In each example, prompt parts in
brackets [any]
represent optional parts of the prompt, and prompt parts
without brackets or in parenthesis (any)
represent required parts of the
prompt.
Bash Session (console, shell-session):
[any@any]$ ls -lh [any@any]# ls -lh [any@any]% ls -lh $ ls -lh # ls -lh % ls -lh > ls -lh
MSDOS Session (doscon):
[any]> dir > dir More? dir
Tcsh Session (tcshcon):
(any)> ls -lh ? ls -lh
PowerShell Session (ps1con):
PS[any]> Get-ChildItem PS> Get-ChildItem >> Get-ChildItem
… that’s all?¶
Well, why not write your own? Contributing to Pygments is easy and fun. Take a look at the docs on lexer development. Pull requests are welcome on GitHub.
Note: the languages listed here are supported in the development version. The latest release may lack a few of them.