This page lists all available builtin lexers and the options they take.
Currently, all lexers support these options:
Make sure that the input ends with a newline (default: True). This is required for some lexers that consume input linewise.
New in version 1.3.
If given, must be an encoding name (such as "utf-8"). This encoding will be used to convert the input string to Unicode (if it is not already a Unicode string). The default is "guess".
If this option is set to "guess", a simple UTF-8 vs. Latin-1 detection is used, if it is set to "chardet", the chardet library is used to guess the encoding of the input.
New in version 0.6.
The “Short Names” field lists the identifiers that can be used with the get_lexer_by_name() function.
These lexers are builtin and can be imported from pygments.lexers:
Short names: | as3, actionscript3 |
---|---|
Filenames: | *.as |
MIME types: | application/x-actionscript3, text/x-actionscript3, text/actionscript3 |
For ActionScript 3 source code.
New in version 0.11.
Short names: | as, actionscript |
---|---|
Filenames: | *.as |
MIME types: | application/x-actionscript, text/x-actionscript, text/actionscript |
For ActionScript source code.
New in version 0.9.
Short names: | mxml |
---|---|
Filenames: | *.mxml |
MIME types: | None |
For MXML markup. Nested AS3 in <script> tags is highlighted by the appropriate lexer.
New in version 1.1.
Short names: | gap |
---|---|
Filenames: | *.g, *.gd, *.gi, *.gap |
MIME types: | None |
For GAP source code.
New in version 2.0.
Short names: | mathematica, mma, nb |
---|---|
Filenames: | *.nb, *.cdf, *.nbp, *.ma |
MIME types: | application/mathematica, application/vnd.wolfram.mathematica, application/vnd.wolfram.mathematica.package, application/vnd.wolfram.cdf |
Lexer for Mathematica source code.
New in version 2.0.
Short names: | mupad |
---|---|
Filenames: | *.mu |
MIME types: | None |
A MuPAD lexer. Contributed by Christopher Creutzig <christopher@creutzig.de>.
New in version 0.8.
Short names: | at, ambienttalk, ambienttalk/2 |
---|---|
Filenames: | *.at |
MIME types: | text/x-ambienttalk |
Lexer for AmbientTalk source code.
New in version 2.0.
Short names: | apl |
---|---|
Filenames: | *.apl |
MIME types: | None |
A simple APL lexer.
New in version 2.0.
Short names: | c-objdump |
---|---|
Filenames: | *.c-objdump |
MIME types: | text/x-c-objdump |
For the output of ‘objdump -Sr on compiled C files’
Short names: | ca65 |
---|---|
Filenames: | *.s |
MIME types: | None |
For ca65 assembler sources.
New in version 1.6.
Short names: | cpp-objdump, c++-objdumb, cxx-objdump |
---|---|
Filenames: | *.cpp-objdump, *.c++-objdump, *.cxx-objdump |
MIME types: | text/x-cpp-objdump |
For the output of ‘objdump -Sr on compiled C++ files’
Short names: | d-objdump |
---|---|
Filenames: | *.d-objdump |
MIME types: | text/x-d-objdump |
For the output of ‘objdump -Sr on compiled D files’
Short names: | gas, asm |
---|---|
Filenames: | *.s, *.S |
MIME types: | text/x-gas |
For Gas (AT&T) assembly code.
Short names: | llvm |
---|---|
Filenames: | *.ll |
MIME types: | text/x-llvm |
For LLVM assembly code.
Short names: | nasm |
---|---|
Filenames: | *.asm, *.ASM |
MIME types: | text/x-nasm |
For Nasm (Intel) assembly code.
Short names: | objdump-nasm |
---|---|
Filenames: | *.objdump-intel |
MIME types: | text/x-nasm-objdump |
For the output of ‘objdump -d -M intel’.
New in version 2.0.
Short names: | objdump |
---|---|
Filenames: | *.objdump |
MIME types: | text/x-objdump |
For the output of ‘objdump -dr’
Short names: | autoit |
---|---|
Filenames: | *.au3 |
MIME types: | text/x-autoit |
For AutoIt files.
AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting
New in version 1.6.
Short names: | ahk, autohotkey |
---|---|
Filenames: | *.ahk, *.ahkl |
MIME types: | text/x-autohotkey |
For autohotkey source code.
New in version 1.4.
Short names: | blitzbasic, b3d, bplus |
---|---|
Filenames: | *.bb, *.decls |
MIME types: | text/x-bb |
For BlitzBasic source code.
New in version 2.0.
Short names: | blitzmax, bmax |
---|---|
Filenames: | *.bmx |
MIME types: | text/x-bmx |
For BlitzMax source code.
New in version 1.4.
Short names: | cbmbas |
---|---|
Filenames: | *.bas |
MIME types: | None |
For CBM BASIC V2 sources.
New in version 1.6.
Short names: | abap |
---|---|
Filenames: | *.abap |
MIME types: | text/x-abap |
Lexer for ABAP, SAP’s integrated language.
New in version 1.1.
Short names: | cobolfree |
---|---|
Filenames: | *.cbl, *.CBL |
MIME types: | None |
Lexer for Free format OpenCOBOL code.
New in version 1.6.
Short names: | cobol |
---|---|
Filenames: | *.cob, *.COB, *.cpy, *.CPY |
MIME types: | text/x-cobol |
Lexer for OpenCOBOL code.
New in version 1.6.
Short names: | gooddata-cl |
---|---|
Filenames: | *.gdc |
MIME types: | text/x-gooddata-cl |
Lexer for GoodData-CL script files.
New in version 1.4.
Short names: | maql |
---|---|
Filenames: | *.maql |
MIME types: | text/x-gooddata-maql, application/x-gooddata-maql |
Lexer for GoodData MAQL scripts.
New in version 1.4.
Short names: | openedge, abl, progress |
---|---|
Filenames: | *.p, *.cls |
MIME types: | text/x-openedge, application/x-openedge |
Lexer for OpenEdge ABL (formerly Progress) source code.
New in version 1.5.
Short names: | c |
---|---|
Filenames: | *.c, *.h, *.idc |
MIME types: | text/x-chdr, text/x-csrc |
For C source code with preprocessor directives.
Short names: | cpp, c++ |
---|---|
Filenames: | *.cpp, *.hpp, *.c++, *.h++, *.cc, *.hh, *.cxx, *.hxx, *.C, *.H, *.cp, *.CPP |
MIME types: | text/x-c++hdr, text/x-c++src |
For C++ source code with preprocessor directives.
Short names: | clay |
---|---|
Filenames: | *.clay |
MIME types: | text/x-clay |
For Clay source.
New in version 2.0.
Short names: | cuda, cu |
---|---|
Filenames: | *.cu, *.cuh |
MIME types: | text/x-cuda |
For NVIDIA CUDA™ source.
New in version 1.6.
Short names: | ec |
---|---|
Filenames: | *.ec, *.eh |
MIME types: | text/x-echdr, text/x-ecsrc |
For eC source code with preprocessor directives.
New in version 1.5.
Short names: | mql, mq4, mq5, mql4, mql5 |
---|---|
Filenames: | *.mq4, *.mq5, *.mqh |
MIME types: | text/x-mql |
For MQL4 and MQL5 source code.
New in version 2.0.
Short names: | nesc |
---|---|
Filenames: | *.nc |
MIME types: | text/x-nescsrc |
For nesC source code with preprocessor directives.
New in version 2.0.
Short names: | pike |
---|---|
Filenames: | *.pike, *.pmod |
MIME types: | text/x-pike |
For Pike source code.
New in version 2.0.
Short names: | swig |
---|---|
Filenames: | *.swg, *.i |
MIME types: | text/swig |
For SWIG source code.
New in version 2.0.
Short names: | vala, vapi |
---|---|
Filenames: | *.vala, *.vapi |
MIME types: | text/x-vala |
For Vala source code with preprocessor directives.
New in version 1.1.
Short names: | apacheconf, aconf, apache |
---|---|
Filenames: | .htaccess, apache.conf, apache2.conf |
MIME types: | text/x-apacheconf |
Lexer for configuration files following the Apache config file format.
New in version 0.6.
Short names: | cfengine3, cf3 |
---|---|
Filenames: | *.cf |
MIME types: | None |
Lexer for CFEngine3 policy files.
New in version 1.5.
Short names: | docker, dockerfile |
---|---|
Filenames: | Dockerfile, *.docker |
MIME types: | text/x-dockerfile-config |
Lexer for Docker configuration files.
New in version 2.0.
Short names: | ini, cfg, dosini |
---|---|
Filenames: | *.ini, *.cfg |
MIME types: | text/x-ini |
Lexer for configuration files in INI style.
Short names: | kconfig, menuconfig, linux-config, kernel-config |
---|---|
Filenames: | Kconfig, *Config.in*, external.in*, standard-modules.in |
MIME types: | text/x-kconfig |
For Linux-style Kconfig files.
New in version 1.6.
Short names: | lighty, lighttpd |
---|---|
Filenames: | None |
MIME types: | text/x-lighttpd-conf |
Lexer for Lighttpd configuration files.
New in version 0.11.
Short names: | nginx |
---|---|
Filenames: | None |
MIME types: | text/x-nginx-conf |
Lexer for Nginx configuration files.
New in version 0.11.
Short names: | properties, jproperties |
---|---|
Filenames: | *.properties |
MIME types: | text/x-java-properties |
Lexer for configuration files in Java’s properties format.
New in version 1.4.
Short names: | registry |
---|---|
Filenames: | *.reg |
MIME types: | text/x-windows-registry |
Lexer for Windows Registry files produced by regedit.
New in version 1.6.
Short names: | pypylog, pypy |
---|---|
Filenames: | *.pypylog |
MIME types: | application/x-pypylog |
Lexer for PyPy log files.
New in version 1.5.
Short names: | vctreestatus |
---|---|
Filenames: | None |
MIME types: | None |
For colorizing output of version control status commans, like “hg status” or “svn status”.
New in version 2.0.
Short names: | croc |
---|---|
Filenames: | *.croc |
MIME types: | text/x-crocsrc |
For Croc source.
Short names: | d |
---|---|
Filenames: | *.d, *.di |
MIME types: | text/x-dsrc |
For D source.
New in version 1.2.
Short names: | minid |
---|---|
Filenames: | None |
MIME types: | text/x-minidsrc |
For MiniD source. MiniD is now known as Croc.
Short names: | jsonld, json-ld |
---|---|
Filenames: | *.jsonld |
MIME types: | application/ld+json |
For JSON-LD linked data.
New in version 2.0.
Short names: | json |
---|---|
Filenames: | *.json |
MIME types: | application/json |
For JSON data structures.
New in version 1.5.
Short names: | dpatch |
---|---|
Filenames: | *.dpatch, *.darcspatch |
MIME types: | None |
DarcsPatchLexer is a lexer for the various versions of the darcs patch format. Examples of this format are derived by commands such as darcs annotate --patch and darcs send.
New in version 0.10.
Short names: | diff, udiff |
---|---|
Filenames: | *.diff, *.patch |
MIME types: | text/x-diff, text/x-patch |
Lexer for unified or context-style diffs or patches.
Short names: | boo |
---|---|
Filenames: | *.boo |
MIME types: | text/x-boo |
For Boo source code.
Short names: | aspx-cs |
---|---|
Filenames: | *.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd |
MIME types: | None |
Lexer for highligting C# within ASP.NET pages.
Short names: | csharp, c# |
---|---|
Filenames: | *.cs |
MIME types: | text/x-csharp |
For C# source code.
Additional options accepted:
Determines which Unicode characters this lexer allows for identifiers. The possible values are:
The default value is basic.
New in version 0.8.
Short names: | fsharp |
---|---|
Filenames: | *.fs, *.fsi |
MIME types: | text/x-fsharp |
For the F# language (version 3.0).
AAAAACK Strings http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html#_Toc335818775
New in version 1.5.
Short names: | nemerle |
---|---|
Filenames: | *.n |
MIME types: | text/x-nemerle |
For Nemerle source code.
Additional options accepted:
Determines which Unicode characters this lexer allows for identifiers. The possible values are:
The default value is basic.
New in version 1.5.
Short names: | aspx-vb |
---|---|
Filenames: | *.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd |
MIME types: | None |
Lexer for highligting Visual Basic.net within ASP.NET pages.
Short names: | vb.net, vbnet |
---|---|
Filenames: | *.vb, *.bas |
MIME types: | text/x-vbnet, text/x-vba |
For Visual Basic.NET source code.
Short names: | alloy |
---|---|
Filenames: | *.als |
MIME types: | text/x-alloy |
For Alloy source code.
New in version 2.0.
Short names: | bro |
---|---|
Filenames: | *.bro |
MIME types: | None |
For Bro scripts.
New in version 1.5.
Short names: | mscgen, msc |
---|---|
Filenames: | *.msc |
MIME types: | None |
For Mscgen files.
New in version 1.6.
Short names: | pan |
---|---|
Filenames: | *.pan |
MIME types: | None |
Lexer for pan source files.
Based on tcsh lexer.
New in version 2.0.
Short names: | protobuf, proto |
---|---|
Filenames: | *.proto |
MIME types: | None |
Lexer for Protocol Buffer definition files.
New in version 1.4.
Short names: | puppet |
---|---|
Filenames: | *.pp |
MIME types: | None |
For Puppet configuration DSL.
New in version 1.6.
Short names: | rsl |
---|---|
Filenames: | *.rsl |
MIME types: | text/rsl |
RSL is the formal specification language used in RAISE (Rigorous Approach to Industrial Software Engineering) method.
New in version 2.0.
Short names: | vgl |
---|---|
Filenames: | *.rpf |
MIME types: | None |
For SampleManager VGL source code.
New in version 1.6.
Short names: | dylan-console, dylan-repl |
---|---|
Filenames: | *.dylan-console |
MIME types: | text/x-dylan-console |
For Dylan interactive console output like:
? let a = 1;
=> 1
? a
=> 1
This is based on a copy of the RubyConsoleLexer.
New in version 1.6.
Short names: | dylan |
---|---|
Filenames: | *.dylan, *.dyl, *.intr |
MIME types: | text/x-dylan |
For the Dylan language.
New in version 0.7.
Short names: | dylan-lid, lid |
---|---|
Filenames: | *.lid, *.hdp |
MIME types: | text/x-dylan-lid |
For Dylan LID (Library Interchange Definition) files.
New in version 1.6.
Short names: | iex |
---|---|
Filenames: | None |
MIME types: | text/x-elixir-shellsession |
For Elixir interactive console (iex) output like:
iex> [head | tail] = [1,2,3]
[1,2,3]
iex> head
1
iex> tail
[2,3]
iex> [head | tail]
[1,2,3]
iex> length [head | tail]
3
New in version 1.5.
Short names: | elixir, ex, exs |
---|---|
Filenames: | *.ex, *.exs |
MIME types: | text/x-elixir |
For the Elixir language.
New in version 1.5.
Short names: | erlang |
---|---|
Filenames: | *.erl, *.hrl, *.es, *.escript |
MIME types: | text/x-erlang |
For the Erlang functional programming language.
Blame Jeremy Thurgood (http://jerith.za.net/).
New in version 0.9.
Short names: | erl |
---|---|
Filenames: | *.erl-sh |
MIME types: | text/x-erl-shellsession |
Shell sessions in erl (for Erlang code).
New in version 1.1.
Short names: | befunge |
---|---|
Filenames: | *.befunge |
MIME types: | application/x-befunge |
Lexer for the esoteric Befunge language.
New in version 0.7.
Short names: | brainfuck, bf |
---|---|
Filenames: | *.bf, *.b |
MIME types: | application/x-brainfuck |
Lexer for the esoteric BrainFuck language.
Short names: | redcode |
---|---|
Filenames: | *.cw |
MIME types: | None |
A simple Redcode lexer based on ICWS‘94. Contributed by Adam Blinkinsop <blinks@acm.org>.
New in version 0.8.
Short names: | fan |
---|---|
Filenames: | *.fan |
MIME types: | application/x-fantom |
For Fantom source code.
New in version 1.5.
Short names: | fortran |
---|---|
Filenames: | *.f, *.f90, *.F, *.F90 |
MIME types: | text/x-fortran |
Lexer for FORTRAN 90 code.
New in version 0.10.
Short names: | foxpro, vfp, clipper, xbase |
---|---|
Filenames: | *.PRG, *.prg |
MIME types: | None |
Lexer for Microsoft Visual FoxPro language.
FoxPro syntax allows to shorten all keywords and function names to 4 characters. Shortened forms are not recognized by this lexer.
New in version 1.6.
Short names: | cypher |
---|---|
Filenames: | *.cyp, *.cypher |
MIME types: | None |
For the Cypher version in Neo4J 2.0
New in version 2.0.
Short names: | systemverilog, sv |
---|---|
Filenames: | *.sv, *.svh |
MIME types: | text/x-systemverilog |
Extends verilog lexer to recognise all SystemVerilog keywords from IEEE 1800-2009 standard.
New in version 1.5.
Short names: | verilog, v |
---|---|
Filenames: | *.v |
MIME types: | text/x-verilog |
For verilog source code with preprocessor directives.
New in version 1.4.
Short names: | vhdl |
---|---|
Filenames: | *.vhdl, *.vhd |
MIME types: | text/x-vhdl |
For VHDL source code.
New in version 1.5.
Short names: | idl |
---|---|
Filenames: | *.pro |
MIME types: | text/idl |
Pygments Lexer for IDL (Interactive Data Language).
New in version 1.6.
Short names: | igor, igorpro |
---|---|
Filenames: | *.ipf |
MIME types: | text/ipf |
Pygments Lexer for Igor Pro procedure files (.ipf). See http://www.wavemetrics.com/ and http://www.igorexchange.com/.
New in version 2.0.
Short names: | control, debcontrol |
---|---|
Filenames: | control |
MIME types: | None |
Lexer for Debian control files and apt-cache show <pkg> outputs.
New in version 0.9.
Short names: | nsis, nsi, nsh |
---|---|
Filenames: | *.nsi, *.nsh |
MIME types: | text/x-nsis |
For NSIS scripts.
New in version 1.6.
Short names: | spec |
---|---|
Filenames: | *.spec |
MIME types: | text/x-rpm-spec |
For RPM .spec files.
New in version 1.6.
Short names: | sourceslist, sources.list, debsources |
---|---|
Filenames: | sources.list |
MIME types: | None |
Lexer that highlights debian sources.list files.
New in version 0.7.
Short names: | inform6, i6 |
---|---|
Filenames: | *.inf |
MIME types: | None |
For Inform 6 source code.
New in version 2.0.
Short names: | i6t |
---|---|
Filenames: | *.i6t |
MIME types: | None |
For Inform 6 template code.
New in version 2.0.
Short names: | jlcon |
---|---|
Filenames: | None |
MIME types: | None |
For Julia console sessions. Modeled after MatlabSessionLexer.
New in version 1.6.
Short names: | aspectj |
---|---|
Filenames: | *.aj |
MIME types: | text/x-aspectj |
For AspectJ source code.
New in version 1.6.
Short names: | ceylon |
---|---|
Filenames: | *.ceylon |
MIME types: | text/x-ceylon |
For Ceylon source code.
New in version 1.6.
Short names: | clojure, clj |
---|---|
Filenames: | *.clj |
MIME types: | text/x-clojure, application/x-clojure |
Lexer for Clojure source code.
New in version 0.11.
Short names: | clojurescript, cljs |
---|---|
Filenames: | *.cljs |
MIME types: | text/x-clojurescript, application/x-clojurescript |
Lexer for ClojureScript source code.
New in version 2.0.
Short names: | golo |
---|---|
Filenames: | *.golo |
MIME types: | None |
For Golo source code.
New in version 2.0.
Short names: | gosu |
---|---|
Filenames: | *.gs, *.gsx, *.gsp, *.vark |
MIME types: | text/x-gosu |
For Gosu source code.
New in version 1.5.
Short names: | gst |
---|---|
Filenames: | *.gst |
MIME types: | text/x-gosu-template |
For Gosu templates.
New in version 1.5.
Short names: | groovy |
---|---|
Filenames: | *.groovy |
MIME types: | text/x-groovy |
For Groovy source code.
New in version 1.5.
Short names: | ioke, ik |
---|---|
Filenames: | *.ik |
MIME types: | text/x-iokesrc |
For Ioke (a strongly typed, dynamic, prototype based programming language) source.
New in version 1.4.
Short names: | jasmin, jasminxt |
---|---|
Filenames: | *.j |
MIME types: | None |
For Jasmin assembly code.
New in version 2.0.
Short names: | java |
---|---|
Filenames: | *.java |
MIME types: | text/x-java |
For Java source code.
Short names: | kotlin |
---|---|
Filenames: | *.kt |
MIME types: | text/x-kotlin |
For Kotlin source code.
New in version 1.5.
Short names: | pig |
---|---|
Filenames: | *.pig |
MIME types: | text/x-pig |
For Pig Latin source code.
New in version 2.0.
Short names: | common-lisp, cl, lisp, elisp, emacs, emacs-lisp |
---|---|
Filenames: | *.cl, *.lisp, *.el |
MIME types: | text/x-common-lisp |
A Common Lisp lexer.
New in version 0.9.
Short names: | hylang |
---|---|
Filenames: | *.hy |
MIME types: | text/x-hy, application/x-hy |
Lexer for Hy source code.
New in version 2.0.
Short names: | newlisp |
---|---|
Filenames: | *.lsp, *.nl |
MIME types: | text/x-newlisp, application/x-newlisp |
For newLISP. source code (version 10.3.0).
New in version 1.5.
Short names: | racket, rkt |
---|---|
Filenames: | *.rkt, *.rktd, *.rktl |
MIME types: | text/x-racket, application/x-racket |
Lexer for Racket source code (formerly known as PLT Scheme).
New in version 1.6.
Short names: | scheme, scm |
---|---|
Filenames: | *.scm, *.ss |
MIME types: | text/x-scheme, application/x-scheme |
A Scheme lexer, parsing a stream and outputting the tokens needed to highlight scheme code. This lexer could be most probably easily subclassed to parse other LISP-Dialects like Common Lisp, Emacs Lisp or AutoLisp.
This parser is checked with pastes from the LISP pastebin at http://paste.lisp.org/ to cover as much syntax as possible.
It supports the full Scheme syntax as defined in R5RS.
New in version 0.6.
Short names: | basemake |
---|---|
Filenames: | None |
MIME types: | None |
Lexer for simple Makefiles (no preprocessing).
New in version 0.10.
Short names: | cmake |
---|---|
Filenames: | *.cmake, CMakeLists.txt |
MIME types: | text/x-cmake |
Lexer for CMake files.
New in version 1.2.
Short names: | make, makefile, mf, bsdmake |
---|---|
Filenames: | *.mak, *.mk, Makefile, makefile, Makefile.*, GNUmakefile |
MIME types: | text/x-makefile |
Lexer for BSD and GNU make extensions (lenient enough to handle both in the same file even).
Rewritten in Pygments 0.10.
Short names: | bbcode |
---|---|
Filenames: | None |
MIME types: | text/x-bbcode |
A lexer that highlights BBCode(-like) syntax.
New in version 0.6.
Short names: | groff, nroff, man |
---|---|
Filenames: | *.[1234567], *.man |
MIME types: | application/x-troff, text/troff |
Lexer for the (g)roff typesetting language, supporting groff extensions. Mainly useful for highlighting manpage sources.
New in version 0.6.
Short names: | trac-wiki, moin |
---|---|
Filenames: | None |
MIME types: | text/x-trac-wiki |
For MoinMoin (and Trac) Wiki markup.
New in version 0.7.
Short names: | css+mozpreproc |
---|---|
Filenames: | *.css.in |
MIME types: | None |
Subclass of the MozPreprocHashLexer that highlights unlexed data with the CssLexer.
New in version 2.0.
Short names: | mozhashpreproc |
---|---|
Filenames: | None |
MIME types: | None |
Lexer for Mozilla Preprocessor files (with ‘#’ as the marker).
Other data is left untouched.
New in version 2.0.
Short names: | javascript+mozpreproc |
---|---|
Filenames: | *.js.in |
MIME types: | None |
Subclass of the MozPreprocHashLexer that highlights unlexed data with the JavascriptLexer.
New in version 2.0.
Short names: | mozpercentpreproc |
---|---|
Filenames: | None |
MIME types: | None |
Lexer for Mozilla Preprocessor files (with ‘%’ as the marker).
Other data is left untouched.
New in version 2.0.
Short names: | xul+mozpreproc |
---|---|
Filenames: | *.xul.in |
MIME types: | None |
Subclass of the MozPreprocHashLexer that highlights unlexed data with the XmlLexer.
New in version 2.0.
Short names: | rst, rest, restructuredtext |
---|---|
Filenames: | *.rst, *.rest |
MIME types: | text/x-rst, text/prs.fallenstein.rst |
For reStructuredText markup.
New in version 0.7.
Additional options accepted:
Highlight the contents of .. sourcecode:: language, .. code:: language and .. code-block:: language directives with a lexer for the given language (default: True).
New in version 0.8.
Short names: | tex, latex |
---|---|
Filenames: | *.tex, *.aux, *.toc |
MIME types: | text/x-tex, text/x-latex |
Lexer for the TeX and LaTeX typesetting languages.
Short names: | ocaml |
---|---|
Filenames: | *.ml, *.mli, *.mll, *.mly |
MIME types: | text/x-ocaml |
For the OCaml language.
New in version 0.7.
Short names: | opa |
---|---|
Filenames: | *.opa |
MIME types: | text/x-opa |
Lexer for the Opa language (http://opalang.org).
New in version 1.5.
Short names: | sml |
---|---|
Filenames: | *.sml, *.sig, *.fun |
MIME types: | text/x-standardml, application/x-standardml |
For the Standard ML language.
New in version 1.5.
Short names: | bugs, winbugs, openbugs |
---|---|
Filenames: | *.bug |
MIME types: | None |
Pygments Lexer for OpenBugs and WinBugs models.
New in version 1.6.
Short names: | jags |
---|---|
Filenames: | *.jag, *.bug |
MIME types: | None |
Pygments Lexer for JAGS.
New in version 1.6.
Short names: | nixos, nix |
---|---|
Filenames: | *.nix |
MIME types: | text/x-nix |
For the Nix language.
New in version 2.0.
Short names: | logos |
---|---|
Filenames: | *.x, *.xi, *.xm, *.xmi |
MIME types: | text/x-logos |
For Logos + Objective-C source code with preprocessor directives.
New in version 1.6.
Short names: | objective-c, objectivec, obj-c, objc |
---|---|
Filenames: | *.m, *.h |
MIME types: | text/x-objective-c |
For Objective-C source code with preprocessor directives.
Short names: | objective-c++, objectivec++, obj-c++, objc++ |
---|---|
Filenames: | *.mm, *.hh |
MIME types: | text/x-objective-c++ |
For Objective-C++ source code with preprocessor directives.
Short names: | antlr-as, antlr-actionscript |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with ActionScript Target
New in version 1.1.
Short names: | antlr-csharp, antlr-c# |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with C# Target
New in version 1.1.
Short names: | antlr-cpp |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with CPP Target
New in version 1.1.
Short names: | antlr-java |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with Java Target
New in version 1..
Short names: | antlr |
---|---|
Filenames: | None |
MIME types: | None |
Generic ANTLR Lexer. Should not be called directly, instead use DelegatingLexer for your target language.
New in version 1.1.
Short names: | antlr-objc |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with Objective-C Target
New in version 1.1.
Short names: | antlr-perl |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with Perl Target
New in version 1.1.
Short names: | antlr-python |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with Python Target
New in version 1.1.
Short names: | antlr-ruby, antlr-rb |
---|---|
Filenames: | *.G, *.g |
MIME types: | None |
ANTLR with Ruby Target
New in version 1.1.
Short names: | ebnf |
---|---|
Filenames: | *.ebnf |
MIME types: | text/x-ebnf |
Lexer for ISO/IEC 14977 EBNF grammars.
New in version 2.0.
Short names: | ragel-c |
---|---|
Filenames: | *.rl |
MIME types: | None |
A lexer for Ragel in a C host file.
New in version 1.1.
Short names: | ragel-cpp |
---|---|
Filenames: | *.rl |
MIME types: | None |
A lexer for Ragel in a CPP host file.
New in version 1.1.
Short names: | ragel-d |
---|---|
Filenames: | *.rl |
MIME types: | None |
A lexer for Ragel in a D host file.
New in version 1.1.
Short names: | ragel-em |
---|---|
Filenames: | *.rl |
MIME types: | None |
A lexer for Ragel embedded in a host language file.
This will only highlight Ragel statements. If you want host language highlighting then call the language-specific Ragel lexer.
New in version 1.1.
Short names: | ragel-java |
---|---|
Filenames: | *.rl |
MIME types: | None |
A lexer for Ragel in a Java host file.
New in version 1.1.
Short names: | ragel |
---|---|
Filenames: | None |
MIME types: | None |
A pure Ragel lexer. Use this for fragments of Ragel. For .rl files, use RagelEmbeddedLexer instead (or one of the language-specific subclasses).
New in version 1.1.
Short names: | ragel-objc |
---|---|
Filenames: | *.rl |
MIME types: | None |
A lexer for Ragel in an Objective C host file.
New in version 1.1.
Short names: | ada, ada95, ada2005 |
---|---|
Filenames: | *.adb, *.ads, *.ada |
MIME types: | text/x-ada |
For Ada source code.
New in version 1.3.
Short names: | delphi, pas, pascal, objectpascal |
---|---|
Filenames: | *.pas |
MIME types: | text/x-pascal |
For Delphi (Borland Object Pascal), Turbo Pascal and Free Pascal source code.
Additional options accepted:
Short names: | modula2, m2 |
---|---|
Filenames: | *.def, *.mod |
MIME types: | text/x-modula2 |
For Modula-2 source code.
Additional options that determine which keywords are highlighted:
New in version 1.3.
Short names: | pawn |
---|---|
Filenames: | *.p, *.pwn, *.inc |
MIME types: | text/x-pawn |
For Pawn source code.
New in version 2.0.
Short names: | sp |
---|---|
Filenames: | *.sp |
MIME types: | text/x-sourcepawn |
For SourcePawn source code with preprocessor directives.
New in version 1.6.
Short names: | logtalk |
---|---|
Filenames: | *.lgt, *.logtalk |
MIME types: | text/x-logtalk |
For Logtalk source code.
New in version 0.10.
Short names: | prolog |
---|---|
Filenames: | *.ecl, *.prolog, *.pro, *.pl |
MIME types: | text/x-prolog |
Lexer for Prolog files.
Short names: | rconsole, rout |
---|---|
Filenames: | *.Rout |
MIME types: | None |
For R console transcripts or R CMD BATCH output files.
Short names: | rd |
---|---|
Filenames: | *.Rd |
MIME types: | text/x-r-doc |
Pygments Lexer for R documentation (Rd) files
This is a very minimal implementation, highlighting little more than the macros. A description of Rd syntax is found in Writing R Extensions and Parsing Rd files.
New in version 1.6.
Short names: | splus, s, r |
---|---|
Filenames: | *.S, *.R, .Rhistory, .Rprofile, .Renviron |
MIME types: | text/S-plus, text/S, text/x-r-source, text/x-r, text/x-R, text/x-r-history, text/x-r-profile |
For S, S-plus, and R source code.
New in version 0.10.
Short names: | resource, resourcebundle |
---|---|
Filenames: | *.txt |
MIME types: | None |
Lexer for ICU Resource bundles.
New in version 2.0.
Short names: | robotframework |
---|---|
Filenames: | *.txt, *.robot |
MIME types: | text/x-robotframework |
For Robot Framework test data.
Supports both space and pipe separated plain text formats.
New in version 1.6.
Short names: | rust |
---|---|
Filenames: | *.rs |
MIME types: | text/x-rustsrc |
Lexer for the Rust programming language (version 0.9).
New in version 1.6.
Short names: | applescript |
---|---|
Filenames: | *.applescript |
MIME types: | None |
For AppleScript source code, including AppleScript Studio. Contributed by Andreas Amann <aamann@mac.com>.
New in version 1.0.
Short names: | chai, chaiscript |
---|---|
Filenames: | *.chai |
MIME types: | text/x-chaiscript, application/x-chaiscript |
For ChaiScript source code.
New in version 2.0.
Short names: | hybris, hy |
---|---|
Filenames: | *.hy, *.hyb |
MIME types: | text/x-hybris, application/x-hybris |
For Hybris source code.
New in version 1.4.
Short names: | lsl |
---|---|
Filenames: | *.lsl |
MIME types: | text/x-lsl |
For Second Life’s Linden Scripting Language source code.
New in version 2.0.
Short names: | lua |
---|---|
Filenames: | *.lua, *.wlua |
MIME types: | text/x-lua, application/x-lua |
For Lua source code.
Additional options accepted:
If given, must be a list of module names whose function names should not be highlighted. By default all modules are highlighted.
To get a list of allowed modules have a look into the _lua_builtins module:
>>> from pygments.lexers._lua_builtins import MODULES
>>> MODULES.keys()
['string', 'coroutine', 'modules', 'io', 'basic', ...]
Short names: | moocode, moo |
---|---|
Filenames: | *.moo |
MIME types: | text/x-moocode |
For MOOCode (the MOO scripting language).
New in version 0.9.
Short names: | moon, moonscript |
---|---|
Filenames: | *.moon |
MIME types: | text/x-moonscript, application/x-moonscript |
For MoonScript source code.
New in version 1.5.
Short names: | rexx, arexx |
---|---|
Filenames: | *.rexx, *.rex, *.rx, *.arexx |
MIME types: | text/x-rexx |
Rexx is a scripting language available for a wide range of different platforms with its roots found on mainframe systems. It is popular for I/O- and data based tasks and can act as glue language to bind different applications together.
New in version 2.0.
Short names: | bash, sh, ksh, shell |
---|---|
Filenames: | *.sh, *.ksh, *.bash, *.ebuild, *.eclass, .bashrc, bashrc, .bash\*, bash\*, PKGBUILD |
MIME types: | application/x-sh, application/x-shellscript |
Lexer for (ba|k|)sh shell scripts.
New in version 0.6.
Short names: | console |
---|---|
Filenames: | *.sh-session |
MIME types: | application/x-shell-session |
Lexer for simplistic shell sessions.
New in version 1.1.
Short names: | bat, batch, dosbatch, winbatch |
---|---|
Filenames: | *.bat, *.cmd |
MIME types: | application/x-dos-batch |
Lexer for the DOS/Windows Batch file format.
New in version 0.7.
Short names: | powershell, posh, ps1, psm1 |
---|---|
Filenames: | *.ps1, *.psm1 |
MIME types: | text/x-powershell |
For Windows PowerShell code.
New in version 1.5.
Short names: | shell-session |
---|---|
Filenames: | *.shell-session |
MIME types: | application/x-sh-session |
Lexer for shell sessions that works with different command prompts
New in version 1.6.
Short names: | tcsh, csh |
---|---|
Filenames: | *.tcsh, *.csh |
MIME types: | application/x-csh |
Lexer for tcsh scripts.
New in version 0.10.
Short names: | snobol |
---|---|
Filenames: | *.snobol |
MIME types: | text/x-snobol |
Lexer for the SNOBOL4 programming language.
Recognizes the common ASCII equivalents of the original SNOBOL4 operators. Does not require spaces around binary operators.
New in version 1.5.
Short names: | raw |
---|---|
Filenames: | None |
MIME types: | application/x-pygments-tokens |
Recreate a token stream formatted with the RawTokenFormatter. This lexer raises exceptions during parsing if the token stream in the file is malformed.
Additional options accepted:
Short names: | text |
---|---|
Filenames: | *.txt |
MIME types: | text/plain |
“Null” lexer, doesn’t highlight anything.
Short names: | html+cheetah, html+spitfire, htmlcheetah |
---|---|
Filenames: | None |
MIME types: | text/html+cheetah, text/html+spitfire |
Subclass of the CheetahLexer that highlights unlexed data with the HtmlLexer.
Short names: | js+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+cheetah, text/x-javascript+cheetah, text/javascript+cheetah, application/x-javascript+spitfire, text/x-javascript+spitfire, text/javascript+spitfire |
Subclass of the CheetahLexer that highlights unlexed data with the JavascriptLexer.
Short names: | cheetah, spitfire |
---|---|
Filenames: | *.tmpl, *.spt |
MIME types: | application/x-cheetah, application/x-spitfire |
Generic cheetah templates lexer. Code that isn’t Cheetah markup is yielded as Token.Other. This also works for spitfire templates which use the same syntax.
Short names: | xml+cheetah, xml+spitfire |
---|---|
Filenames: | None |
MIME types: | application/xml+cheetah, application/xml+spitfire |
Subclass of the CheetahLexer that highlights unlexed data with the XmlLexer.
Short names: | cfc |
---|---|
Filenames: | *.cfc |
MIME types: | None |
Coldfusion markup/script components
New in version 2.0.
Short names: | cfm |
---|---|
Filenames: | *.cfm, *.cfml |
MIME types: | application/x-coldfusion |
Coldfusion markup in html
Short names: | cfs |
---|---|
Filenames: | None |
MIME types: | None |
Coldfusion statements
Short names: | css+django, css+jinja |
---|---|
Filenames: | None |
MIME types: | text/css+django, text/css+jinja |
Subclass of the DjangoLexer that highlights unlexed data with the CssLexer.
Short names: | css+erb, css+ruby |
---|---|
Filenames: | None |
MIME types: | text/css+ruby |
Subclass of ErbLexer which highlights unlexed data with the CssLexer.
Short names: | css+genshitext, css+genshi |
---|---|
Filenames: | None |
MIME types: | text/css+genshi |
A lexer that highlights CSS definitions in genshi text templates.
Short names: | css+php |
---|---|
Filenames: | None |
MIME types: | text/css+php |
Subclass of PhpLexer which highlights unmatched data with the CssLexer.
Short names: | css+smarty |
---|---|
Filenames: | None |
MIME types: | text/css+smarty |
Subclass of the SmartyLexer that highlights unlexed data with the CssLexer.
Short names: | django, jinja |
---|---|
Filenames: | None |
MIME types: | application/x-django-templating, application/x-jinja |
Generic django and jinja template lexer.
It just highlights django/jinja code between the preprocessor directives, other data is left untouched by the lexer.
Short names: | erb |
---|---|
Filenames: | None |
MIME types: | application/x-ruby-templating |
Generic ERB (Ruby Templating) lexer.
Just highlights ruby code between the preprocessor directives, other data is left untouched by the lexer.
All options are also forwarded to the RubyLexer.
Short names: | html+evoque |
---|---|
Filenames: | *.html |
MIME types: | text/html+evoque |
Subclass of the EvoqueLexer that highlights unlexed data with the HtmlLexer.
New in version 1.1.
Short names: | evoque |
---|---|
Filenames: | *.evoque |
MIME types: | application/x-evoque |
For files using the Evoque templating system.
New in version 1.1.
Short names: | xml+evoque |
---|---|
Filenames: | *.xml |
MIME types: | application/xml+evoque |
Subclass of the EvoqueLexer that highlights unlexed data with the XmlLexer.
New in version 1.1.
Short names: | genshi, kid, xml+genshi, xml+kid |
---|---|
Filenames: | *.kid |
MIME types: | application/x-genshi, application/x-kid |
Short names: | genshitext |
---|---|
Filenames: | None |
MIME types: | application/x-genshi-text, text/x-genshi |
A lexer that highlights genshi text templates.
Short names: | html+handlebars |
---|---|
Filenames: | *.handlebars, *.hbs |
MIME types: | text/html+handlebars, text/x-handlebars-template |
Subclass of the HandlebarsLexer that highlights unlexed data with the HtmlLexer.
New in version 2.0.
Short names: | handlebars |
---|---|
Filenames: | None |
MIME types: | None |
Generic handlebars <http://handlebarsjs.com/> template lexer.
Highlights only the Handlebars template tags (stuff between {{ and }}). Everything else is left for a delegating lexer.
New in version 2.0.
Short names: | html+django, html+jinja, htmldjango |
---|---|
Filenames: | None |
MIME types: | text/html+django, text/html+jinja |
Subclass of the DjangoLexer that highighlights unlexed data with the HtmlLexer.
Nested Javascript and CSS is highlighted too.
Short names: | html+genshi, html+kid |
---|---|
Filenames: | None |
MIME types: | text/html+genshi |
Short names: | html+php |
---|---|
Filenames: | *.phtml |
MIME types: | application/x-php, application/x-httpd-php, application/x-httpd-php3, application/x-httpd-php4, application/x-httpd-php5 |
Subclass of PhpLexer that highlights unhandled data with the HtmlLexer.
Nested Javascript and CSS is highlighted too.
Short names: | html+smarty |
---|---|
Filenames: | None |
MIME types: | text/html+smarty |
Subclass of the SmartyLexer that highighlights unlexed data with the HtmlLexer.
Nested Javascript and CSS is highlighted too.
Short names: | js+django, javascript+django, js+jinja, javascript+jinja |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+django, application/x-javascript+jinja, text/x-javascript+django, text/x-javascript+jinja, text/javascript+django, text/javascript+jinja |
Subclass of the DjangoLexer that highlights unlexed data with the JavascriptLexer.
Short names: | js+erb, javascript+erb, js+ruby, javascript+ruby |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+ruby, text/x-javascript+ruby, text/javascript+ruby |
Subclass of ErbLexer which highlights unlexed data with the JavascriptLexer.
Short names: | js+genshitext, js+genshi, javascript+genshitext, javascript+genshi |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+genshi, text/x-javascript+genshi, text/javascript+genshi |
A lexer that highlights javascript code in genshi text templates.
Short names: | js+php, javascript+php |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+php, text/x-javascript+php, text/javascript+php |
Subclass of PhpLexer which highlights unmatched data with the JavascriptLexer.
Short names: | js+smarty, javascript+smarty |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+smarty, text/x-javascript+smarty, text/javascript+smarty |
Subclass of the SmartyLexer that highlights unlexed data with the JavascriptLexer.
Short names: | jsp |
---|---|
Filenames: | *.jsp |
MIME types: | application/x-jsp |
Lexer for Java Server Pages.
New in version 0.7.
Short names: | css+lasso |
---|---|
Filenames: | None |
MIME types: | text/css+lasso |
Subclass of the LassoLexer which highlights unhandled data with the CssLexer.
New in version 1.6.
Short names: | html+lasso |
---|---|
Filenames: | None |
MIME types: | text/html+lasso, application/x-httpd-lasso, application/x-httpd-lasso[89] |
Subclass of the LassoLexer which highlights unhandled data with the HtmlLexer.
Nested JavaScript and CSS is also highlighted.
New in version 1.6.
Short names: | js+lasso, javascript+lasso |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+lasso, text/x-javascript+lasso, text/javascript+lasso |
Subclass of the LassoLexer which highlights unhandled data with the JavascriptLexer.
New in version 1.6.
Short names: | xml+lasso |
---|---|
Filenames: | None |
MIME types: | application/xml+lasso |
Subclass of the LassoLexer which highlights unhandled data with the XmlLexer.
New in version 1.6.
Short names: | liquid |
---|---|
Filenames: | *.liquid |
MIME types: | None |
Lexer for Liquid templates.
New in version 2.0.
Short names: | css+mako |
---|---|
Filenames: | None |
MIME types: | text/css+mako |
Subclass of the MakoLexer that highlights unlexed data with the CssLexer.
New in version 0.7.
Short names: | html+mako |
---|---|
Filenames: | None |
MIME types: | text/html+mako |
Subclass of the MakoLexer that highlights unlexed data with the HtmlLexer.
New in version 0.7.
Short names: | js+mako, javascript+mako |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+mako, text/x-javascript+mako, text/javascript+mako |
Subclass of the MakoLexer that highlights unlexed data with the JavascriptLexer.
New in version 0.7.
Short names: | mako |
---|---|
Filenames: | *.mao |
MIME types: | application/x-mako |
Generic mako templates lexer. Code that isn’t Mako markup is yielded as Token.Other.
New in version 0.7.
Short names: | xml+mako |
---|---|
Filenames: | None |
MIME types: | application/xml+mako |
Subclass of the MakoLexer that highlights unlexed data with the XmlLexer.
New in version 0.7.
Short names: | mason |
---|---|
Filenames: | *.m, *.mhtml, *.mc, *.mi, autohandler, dhandler |
MIME types: | application/x-mason |
Generic mason templates lexer. Stolen from Myghty lexer. Code that isn’t Mason markup is HTML.
New in version 1.4.
Short names: | css+myghty |
---|---|
Filenames: | None |
MIME types: | text/css+myghty |
Subclass of the MyghtyLexer that highlights unlexed data with the CssLexer.
New in version 0.6.
Short names: | html+myghty |
---|---|
Filenames: | None |
MIME types: | text/html+myghty |
Subclass of the MyghtyLexer that highlights unlexed data with the HtmlLexer.
New in version 0.6.
Short names: | js+myghty, javascript+myghty |
---|---|
Filenames: | None |
MIME types: | application/x-javascript+myghty, text/x-javascript+myghty, text/javascript+mygthy |
Subclass of the MyghtyLexer that highlights unlexed data with the JavascriptLexer.
New in version 0.6.
Short names: | myghty |
---|---|
Filenames: | *.myt, autodelegate |
MIME types: | application/x-myghty |
Generic myghty templates lexer. Code that isn’t Myghty markup is yielded as Token.Other.
New in version 0.6.
Short names: | xml+myghty |
---|---|
Filenames: | None |
MIME types: | application/xml+myghty |
Subclass of the MyghtyLexer that highlights unlexed data with the XmlLexer.
New in version 0.6.
Short names: | rhtml, html+erb, html+ruby |
---|---|
Filenames: | *.rhtml |
MIME types: | text/html+ruby |
Subclass of the ERB lexer that highlights the unlexed data with the html lexer.
Nested Javascript and CSS is highlighted too.
Short names: | smarty |
---|---|
Filenames: | *.tpl |
MIME types: | application/x-smarty |
Generic Smarty template lexer.
Just highlights smarty code between the preprocessor directives, other data is left untouched by the lexer.
Short names: | ssp |
---|---|
Filenames: | *.ssp |
MIME types: | application/x-ssp |
Lexer for Scalate Server Pages.
New in version 1.4.
Short names: | tea |
---|---|
Filenames: | *.tea |
MIME types: | text/x-tea |
Lexer for Tea Templates.
New in version 1.5.
Short names: | html+twig |
---|---|
Filenames: | *.twig |
MIME types: | text/html+twig |
Subclass of the TwigLexer that highlights unlexed data with the HtmlLexer.
New in version 2.0.
Short names: | twig |
---|---|
Filenames: | None |
MIME types: | application/x-twig |
Twig template lexer.
It just highlights Twig code between the preprocessor directives, other data is left untouched by the lexer.
New in version 2.0.
Short names: | html+velocity |
---|---|
Filenames: | None |
MIME types: | text/html+velocity |
Subclass of the VelocityLexer that highlights unlexed data with the HtmlLexer.
Short names: | velocity |
---|---|
Filenames: | *.vm, *.fhtml |
MIME types: | None |
Generic Velocity template lexer.
Just highlights velocity directives and variable references, other data is left untouched by the lexer.
Short names: | xml+velocity |
---|---|
Filenames: | None |
MIME types: | application/xml+velocity |
Subclass of the VelocityLexer that highlights unlexed data with the XmlLexer.
Short names: | xml+django, xml+jinja |
---|---|
Filenames: | None |
MIME types: | application/xml+django, application/xml+jinja |
Subclass of the DjangoLexer that highlights unlexed data with the XmlLexer.
Short names: | xml+erb, xml+ruby |
---|---|
Filenames: | None |
MIME types: | application/xml+ruby |
Subclass of ErbLexer which highlights data outside preprocessor directives with the XmlLexer.
Short names: | xml+php |
---|---|
Filenames: | None |
MIME types: | application/xml+php |
Subclass of PhpLexer that higlights unhandled data with the XmlLexer.
Short names: | xml+smarty |
---|---|
Filenames: | None |
MIME types: | application/xml+smarty |
Subclass of the SmartyLexer that highlights unlexed data with the XmlLexer.
Short names: | yaml+jinja, salt, sls |
---|---|
Filenames: | *.sls |
MIME types: | text/x-yaml+jinja, text/x-sls |
Subclass of the DjangoLexer that highighlights unlexed data with the YamlLexer.
Commonly used in Saltstack salt states.
New in version 2.0.
Short names: | cucumber, gherkin |
---|---|
Filenames: | *.feature |
MIME types: | text/x-gherkin |
For Gherkin <http://github.com/aslakhellesoy/gherkin/> syntax.
New in version 1.2.
Short names: | pot, po |
---|---|
Filenames: | *.pot, *.po |
MIME types: | application/x-gettext, text/x-gettext, text/gettext |
Lexer for Gettext catalog files.
New in version 0.9.
Short names: | http |
---|---|
Filenames: | None |
MIME types: | None |
Lexer for HTTP sessions.
New in version 1.5.
Short names: | irc |
---|---|
Filenames: | *.weechatlog |
MIME types: | text/x-irclog |
Lexer for IRC logs in irssi, xchat or weechat style.
Short names: | coq |
---|---|
Filenames: | *.v |
MIME types: | text/x-coq |
For the Coq theorem prover.
New in version 1.5.
Short names: | urbiscript |
---|---|
Filenames: | *.u |
MIME types: | application/x-urbiscript |
For UrbiScript source code.
New in version 1.5.
Short names: | cirru |
---|---|
Filenames: | *.cirru, *.cr |
MIME types: | text/x-cirru |
Syntax rules of Cirru can be found at: http://cirru.org/
New in version 2.0.
Short names: | duel, jbst, jsonml+bst |
---|---|
Filenames: | *.duel, *.jbst |
MIME types: | text/x-duel, text/x-jbst |
Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks. See http://duelengine.org/. See http://jsonml.org/jbst/.
New in version 1.4.
Short names: | qml |
---|---|
Filenames: | *.qml |
MIME types: | application/x-qml |
For QML files. See http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html.
New in version 1.6.
Short names: | slim |
---|---|
Filenames: | *.slim |
MIME types: | text/x-slim |
For Slim markup.
New in version 2.0.
Short names: | xquery, xqy, xq, xql, xqm |
---|---|
Filenames: | *.xqy, *.xquery, *.xq, *.xql, *.xqm |
MIME types: | text/xquery, application/xquery |
An XQuery lexer, parsing a stream and outputting the tokens needed to highlight xquery code.
New in version 1.4.
New in version 0.6.
To get all lexers (both the builtin and the plugin ones), you can use the get_all_lexers() function from the pygments.lexers module:
>>> from pygments.lexers import get_all_lexers
>>> i = get_all_lexers()
>>> i.next()
('Diff', ('diff',), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch'))
>>> i.next()
('Delphi', ('delphi', 'objectpascal', 'pas', 'pascal'), ('*.pas',), ('text/x-pascal',))
>>> i.next()
('XML+Ruby', ('xml+erb', 'xml+ruby'), (), ())
As you can see, the return value is an iterator which yields tuples in the form (name, aliases, filetypes, mimetypes).