1 # This file describes which highlighting scheme is applied to a particular
5 # System-wide files (this and syntax definitions) are located in
6 # @datarootdir@/@PACKAGE@/syntax/ directory.
8 # User's files (this and syntax definitions) are located in
9 # ~/.local/share/@PACKAGE@/syntax directory.
11 # If user's file is missing, system-wide one is used.
14 # This file is rescanned on opening of every new editor file.
16 # Format of this file is following.
18 # Each entry consists of two lines: a "file" specification and the
19 # corresponding highlighting definition ("include"). A file specification
20 # can have two or three fields, each separated by white-space characters.
22 # The first field is a regular expression that is matched against the file
23 # name. The second field is a description of the file type and is
24 # currently unused. The third (optional) field is a regular expression
25 # that is matched against the first line of the file. The first entry
26 # that matches wins, that is, all the entries below are ignored.
28 # Certain characters must be quoted in these fields. These are space (\s),
29 # tabs (\t), backslashes(\\), plus (\+) and asterisk (\*). Braces {} and
30 # brackets [] must not be quoted in this file. However, they have a special
31 # meaning when used in the actual syntax definitions.
33 # You can use the following colors in the syntax highlighting files:
34 # black, blue, brightblue, brightcyan, brightgreen, brightmagenta,
35 # brightred, brown, cyan, gray, green, lightgray, magenta, red, white,
39 file [Ss]yntax$ Syntax\sHighlighting\sdefinitions ^#\ssyntax\srules\sversion\s
42 file filehighlight\\.ini$ File\sHighlighting\sdefinitions ^#\sfile\shighlight\srules\sversion\s
43 include filehighlight.syntax
45 file ..\*\\.e$ Eiffel\sSource\sFile
48 file ..\*\\.(diff|rej|patch)|COMMIT_EDITMSG$ Diff\sOutput ^(diff|Index:)\s
51 file ..\*\\.lsm$ LSM\sFile
54 file .\*(bash(_completion|rc)|profile|\\.(sh|bash(rc|_(completion|profile|log(in|out)|aliases|exports|history))|profile|zlog(in|out)|zprofile|zsh(env|rc)?))$ Shell\sScript ^#!\s\*/(.\*/|usr/bin/env\s)([a-z]?|ba|pdk)sh
57 # Since openrc scripts have no extension "by definition", use an empty pattern
58 # that doesn't match any file name, and therefore only the shebang is used to detect
59 # syntax highlighting rules (see tickets #4246 and #4252 for details).
60 file ^$ OpenRC\sRunscript\sFile ^#!\s\*/sbin/openrc-run
63 file ..\*\\.((?i:ini)|desktop|busname|(auto)?mount|net(dev|work)|link|path|service|slice|socket|swap|target|timer)$ INI-based\sFile
66 file ..\*\\.((?i:pl|pm|psgi)|t)$ Perl\sProgram ^#!.\*([\s/]perl|@PERL@)
69 file ..\*\\.(?i:py)$ Python\sProgram ^#!.\*([\s/]python|@PYTHON@)
72 file ..\*\\.(pyx|pxd|pxi)$ Cython\sor\sPyrex\sProgram
75 file ..\*\\.(?i:rb)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@)
78 file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource
81 file ..\*\\.(?i:html?)$ HTML\sFile
84 file ..\*\\.((?i:xml|xsd|xslt?|dtd)|qpg|qpg\\.in)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s)
87 file ..\*\\.cir$ Spice\scircuit
90 file ..\*\\.(?i:tt)$ Template::Toolkit\sFile
93 file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|..\*\\.mak|Kbuild)$ Makefile
94 include makefile.syntax
96 file (CMakeLists.txt|.\*.cmake)$ CMake
99 file meson\\.build$ Meson\sBuild\sFile
102 file ..\*\\.(?i:pas|dpr|inc)$ Pascal\sProgram
103 include pascal.syntax
105 file ..\*\\.(?i:ad[abs])$ Ada\sProgram
108 file ..\*\\.(?i:i?tcl)$ Tcl\sProgram ^#!.\*([\s/]tclsh|[\s/]wish|/usr/bin/tclsh|/usr/bin/wish)
111 file ..\*\\.(?i:sl)$ S-Lang\sProgram
114 file ..\*\\.tex$ LaTeX\s2.09\sDocument
117 file ..\*\\.(?i:texi|texinfo)$ Texinfo\sDocument
118 include texinfo.syntax
120 file ..\*\\.(dot|gv)$ DOT/Graphviz\sgraph
123 file ..\*\\.c$ C\sProgram
126 file ..\*\\.([hC]|(?i:cxx|cc|cpp|c\\\+\\\+|hxx|hh|hpp|h\\\+\\\+|ino)|[Hh]\\.in)$ C/C\+\+\sProgram
129 file ..\*\\.d$ D\sProgram
132 file ..\*\\.(?i:f)$ Fortran\sProgram
133 include fortran.syntax
135 file ..\*\\.go$ GoLang\sProgram
138 file ..\*\\.rs$ Rust\sProgram
141 file ..\*\\.(?i:f)9[05]$ Freeform\sFortran\sProgram
144 file ..\*\\.i$ SWIG\sSource
147 file ..\*\\.(?i:php)[0-9]?$ PHP\sProgram
150 file ..\*\\.ij[xs]$ J\sFile
153 file ..\*\\.(?i:java?|groovy|Jenkinsfile)$ Java\sProgram
156 file ..\*\\.(properties|config)$ Java\sFile
157 include properties.syntax
159 file ..\*\\.(?i:cs)$ C\#\sProgram
162 file ..\*\\.(?i:m?js)$ JavaScript\sProgram ^#!.\*[\s/](node|nodejs)\\b
165 file ..\*\\.(?i:json)$ JSON\sFile
168 file ..\*\\.(?i:ts)$ TypeScript\sProgram
171 file ..\*\\.(?i:as)$ ActionScript\sProgram
174 file ..\*\\.(as[achmp]x)$ ASPX\sFile
177 file ..\*\\.st$ SmallTalk\sProgram
178 include smalltalk.syntax
180 file ..\*\\.(lisp|lsp|el)$ Lisp\sProgram
183 file ..\*\\.(ml[ilpy]?)$ ML\sProgram
186 file ..\*\\.m$ Matlab\sor\sOctave\sFile
187 include octave.syntax
189 file ..\*\\.(?i:sql)$ SQL\sProgram
192 file ..\*\\.(?i:hql)$ HiveQL\sProgram
195 file ..\*\\.(spec|spec\\.in)$ RPM\sSpecfile
198 file ..\*\\.repo$ YUM\sRepo\sFile
199 include yum-repo.syntax
201 file ..\*\\.awk$ AWK\sFile
204 file ..\*\\.(?i:[cq]ss)$ CSS\sFile
207 file .\*ChangeLog[\\\.A-Za-z0-9_]\*$ GNU\sChangeLog\sFile
208 include changelog.syntax
210 file (..\*\\.m4$|configure\\.in|configure\\.ac) M4\sMacroprocessor\sSource
213 file ..\*\\.(bat|cmd)$ DOS\sBatch
216 file ..\*\\.po[tx]?$ PO\sFile
219 file ..\*\\.(?i:asm|s)$ ASM\sProgram
220 include assembler.syntax
222 file ..\*\\.(?i:pov)$ POV\sScript
223 include povray.syntax
225 file .\*\\.(ebuild|eclass)$ Gentoo\sEbuild
226 include ebuild.syntax
228 file ..\*\\.(?i:lua)$ Lua\sProgram ^#!.\*[\s/]lua
231 file ..\*\\.(?i:idl)$ CORBA\sIDL
234 file Don_t_match_me Mail\sfolder ^(From|Return-(P|p)ath:|From:|Date:)\s
237 file \\.procmailrc$ Procmail\sRC\sFile ^#/usr/bin/procmail
238 include procmail.syntax
240 file sources.list$ sources\slist
241 include debian-sources-list.syntax
243 file control$ Debian\scontrol\sfile
244 include debian-control.syntax
246 file (rules|rocks)$ Debian\srules
247 include makefile.syntax
249 file .\*changelog$ Debian\schangelog\sfile
250 include debian-changelog.syntax
252 file changelog.Debian$ Debian\schangelog\sfile
253 include debian-changelog.syntax
255 file ..\*\\.dsc$ Debian\sdescriptiom\sfile
256 include debian-description.syntax
258 file ..\*\\.(?i:hsc?)$ Haskell\sprogram
259 include haskell.syntax
261 file ..\*\\.(?i:cabal)$ Cabal\sconfig\sfile
264 file ..\*\\.(?i:n)$ Nemerle\sProgram
265 include nemerle.syntax
267 file ..\*\\.(?i:(v|sv|vh|svh))$ Verilog/SystemVerilog\sDevice\sDescription
268 include verilog.syntax
270 file ..\*\\.(?i:hdl|vhdl?)$ VHDL\sDevice\sDescription
273 file ..\*\\.erl$ Erlang\sProgram ^(-module\\(|#!.*escript)
274 include erlang.syntax
276 file ..\*\\.hrl$ Erlang\sHeader ^-record\\(
277 include erlang.syntax
279 file .\*named.conf$ Bind9\sconfiguration
282 file ..\*\\.strace$ Strace\sdebug\soutput
283 include strace.syntax
285 file PKGBUILD$ Arch\spackage\sbuild\sscript
286 include PKGBUILD.syntax
288 file \\.install$ Arch\spackage\sinstall\sscript
291 file ..\*\\.(l|y|yxx|ypp)$ Lex/Flex/Yacc/Bison\ssource
294 file ..\*\\.dlink\\.sw$ D-Link\sSwitch\sCommands
297 file ..\*\\.(?i:jalt?)$ Jal\ssource
300 file ..\*\\.(?i:lkr)$ PIC\slinker\sscript\sfile
303 file ..\*\\.pp$ Puppet\smanifest\sfile
304 include puppet.syntax
306 file ..\*\\.(glsl|vert|frag|geom)$ GLSL\sProgram
309 file ..\*\\.cuh?$ CUDA\sProgram
312 file ..\*\\.cl$ OpenCL\sProgram
313 include opencl.syntax
315 file ..\*\\.(?i:ya?ml)$ YAML\sFile
318 file .\*\\.osl$ OSL\sProgram
321 file .\*\\.([rR]|Rd|Rscript)$ R\sProgram
324 file ..\*\\.(?i:md)$ Markdown
325 include markdown.syntax
327 file ..\*\\.proto$ Protobuf\sFile
328 include protobuf.syntax
330 file ..\*\\.(?i:yab)$ Yabasic\s(Yet\sAnother\sBASIC)
331 include yabasic.syntax
333 file ..\*\\.(?i:cbl|cob)$ Cobol\sProgram
336 file ..\*\\.kt$ Kotliin\sSource
337 include kotlin.syntax
339 file ..\*\\.swift$ Swift\sProgram
342 file ..\*\\.action$ Privoxy\sFile
343 include privoxy.syntax
345 file .\*\\.toml$ TOML\sFile
348 file .\*\\.(mch|ref|imp)$ B\sFile
352 include unknown.syntax