Legacy syntax overhaul 2 (#577)

* Added title setting (Requires tcell pull!) and optimized tab display.

* Added Clojure highlighting.

* Changed tcell call to screen.

* Fixed bad reference for getting Buffer name.

* Yet another massive syntax overhaul

* Tweaking and testing web syntax

* More webdev goodies

* Added html5 highlighting and strict html4 highlighting.

* Documentation update
This commit is contained in:
CaptainMcClellan 2017-03-03 10:47:03 -06:00 committed by Zachary Yedidia
parent ab74e56a40
commit d949b58fc0
55 changed files with 311 additions and 133 deletions

View File

@ -18,6 +18,7 @@ color-link statement "bold yellow"
color-link symbol "red"
color-link symbol.brackets "blue"
color-link symbol.tag "bold blue"
color-link symbol.tag.extended "bold green"
color-link preproc "bold cyan"
color-link type "green"
color-link type.keyword "bold green"

View File

@ -182,6 +182,7 @@ Here's a list of subgroups used in micro's built-in syntax files.
* identifier.class ( Also used for functions. )
* identifier.macro
* identifier.var
* preproc.shebang ( The #! at the beginning of a file that tells the os what script interpreter to use. )
* symbol.brackets ( {}()[] and sometimes <> )
* symbol.operator ( Color operator symbols differently. )
* symbol.tag ( For html tags, among other things.)

View File

@ -7,7 +7,7 @@ They are taken from Nano, specifically from [this repository](https://github.com
Micro syntax files are almost identical to Nano's, except for some key differences:
* Micro does not use `icolor`. Instead, for a case insensitive match, use the case insensitive flag (`i`) in the regular expression
* For example, `icolor green ".*"` would become `color green (i) ".*"`
* For example, `icolor green ".*"` would become `color green "(?i).*"`
# Using with colorschemes

View File

@ -86,7 +86,7 @@ color statement "\b(interrupts|noInterrupts)\b"
color statement "\b(noTone|pulseIn|shiftIn|shiftOut|tone)\b"
## Serial
color special "b<(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\b"
color special "\b(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\b"
## Structure
color statement "\b(setup|loop)\b"

View File

@ -1,12 +1,12 @@
syntax "awk" "\.awk$"
header "^#!.*bin/(env +)?awk( |$)"
color preproc "\$[A-Za-z0-9_!@#$*?-]+"
color preproc "\$[A-Za-z0-9_!@#$*?\-]+"
color preproc "\b(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\b"
color preproc "\b(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\b"
color preproc "\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\b"
color identifier.class "\b(function|extension|BEGIN|END)\b"
color symbol.operator "[-+*/%^|!=&<>?;:]|\\|\[|\]"
color symbol.operator "[\-+*/%^|!=&<>?;:]|\\|\[|\]"
color statement "\b(for|if|while|do|else|in|delete|exit)\b"
color special "\b(break|continue|return)\b"
color statement "\b(close|getline|next|nextfile|print|printf|system|fflush)\b"

View File

@ -7,7 +7,7 @@ color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b"
color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b"
color statement "\b(for|if|while|do|else|case|default|switch)\b"
color statement "\b(try|throw|catch|operator|new|delete)\b"
color statement "\b(goto|continue|break|return)\b"
color special "\b(goto|continue|break|return)\b"
color preproc "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
color constant "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"

View File

@ -16,14 +16,15 @@ color constant "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0
## GCC builtins
color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
#Includes
color constant.string "<.+?>"
#Operator Color
color symbol.operator "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color symbol.brackets "[(){}]" "\[" "\]"
#Includes
color constant.string "<.+?>"
#Integers
color constant.number "\b[0-9]+\b" "\b0x[0-9A-Fa-f]+\b"
color constant.number "NULL"

View File

@ -0,0 +1,29 @@
#Syntax highlighting for Clojure
syntax "clojure" "\.(clj)$"
#Constants
color constant ""
color constant.bool "\b(true|false)\b"
color constant.macro "\b(nil)\b"
#Valid numbers
color constant.number "[\-]?[0-9]+?\b"
color constant.number "0x[0-9][A-Fa-f]+?\b"
color constant.number "[\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\b"
#Invalid numbers
color error "[\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\b"
#Symbols
color symbol.operator "[=>+\-*/'?]"
#Types/casting
color type "\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\b"
#Bitwise operations
color special ""
#String highlighting
color constant.string ""
color constant.specialChar "(\\u[0-9A-fa-f]{4,4}|\\newline|\\space|\\tab|\\formfeed|\\backspace|\\return|\\.)"
#Comments
color comment ";.*$"

View File

@ -1,7 +1,7 @@
syntax "coffeescript" "\.coffee$"
header "^#!.*/(env +)?coffee"
color symbol.operator "[!&|=/*+-<>]|\b(and|or|is|isnt|not)\b"
color symbol.operator "[!&|=/*+\-<>]|\b(and|or|is|isnt|not)\b"
color identifier.class "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->"
color symbol.brackets "[()]"
color statement "\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\b"
@ -14,3 +14,4 @@ color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])#([^{].*)?$"
color indent-char.whitespace "[[:space:]]+$"
color indent-char " + +| + +"
color preproc.shebang "#!.+$"

View File

@ -26,7 +26,7 @@ color special "#\{[^}]*\}"
color constant.string.char "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Comments
color comment "#[^{].*$" "#$"
color comment "##[^{].*$" "##$"
color comment.bright "##[^{].*$" "##$"
## "Here" docs
color constant start="<<-?'?EOT'?" end="^EOT"
## Some common markers

View File

@ -13,8 +13,8 @@ color statement "\b(abstract|async|class|const|delegate|enum|event|explicit|ext
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
color statement "\b(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\b"
color special "\b(break|continue)\b"
color constant "\b(true|false)\b"
color symbol "[-+/*=<>?:!~%&|]"
color constant.bool "\b(true|false)\b"
color symbol.operator "[\-+/*=<>?:!~%&|]"
color constant.number "\b([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\b"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\([btnfr]|'|\"|\\)"

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
syntax "dot" "\.(dot|gv)$"
color type "\b(digraph|edge|graph|node|subgraph)\b"
color statement "\b(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\b"
color statement "\b(arrow(head|size|tail)|(bg|fill|font)?color|center|constraint|decorateP|dir|distortion|font(name|size)|head(clip|label)|height|label(angle|distance|font(color|name|size))?|layer(s)?|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|page(dir)?|peripheries|port_label_distance|rank(dir|sep)?|ratio|regular|rotate|same(head|tail)|shape(file)?|sides|size|skew|style|tail(clip|label)|URL|weight|width)\b"
color symbol "=|->|--"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])//.*"

View File

@ -3,10 +3,29 @@
## Licensed under the CC (Creative Commons) License.
##
## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
#Note for dummies like me who had no idea what Embedded Ruby is:
# https://en.wikipedia.org/wiki/ERuby
# It's like Ruby for your browser. Heh. Cheers, CaptainMcClellan
syntax "erb" "\.erb$" "\.rhtml$"
color symbol.brackets start="<" end=">"
#Highlights from html-land
color error "<[^!].*?>"
color symbol.tag "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>"
color preproc "(?i)<[/]?(script|style)( .*|>)*?>"
color special "&[^;[[:space:]]]*;"
color symbol "[:=]"
color identifier "(alt|bgcolor|height|href|id|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
color constant.string ""[^"]*""
color constant.number "(?i)#[0-9A-F]{6,6}"
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
color comment "<!--.+?-->"
color preproc "<!DOCTYPE.+?>"
## The tags that were here before. Disabled now.
#color symbol.tag start="<" end=">"
#Reset syntax highlighting for ruby
color default start="<%" end="%>"
color preproc "<%|%>"
color red "&[^;[[:space:]]]*;"
color statement "\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b"
color identifier.var "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
@ -22,4 +41,3 @@ color comment.bright "##[^{].*$" "##$"
color identifier.macro start="<<-?'?EOT'?" end="^EOT"
color todo "(XXX|TODO|FIXME|\?\?\?)"

View File

@ -5,9 +5,10 @@ header "^#!.*/(env +)?fish( |$)"
color constant.number "\b[0-9]+\b"
# Conditionals and control flow
color statement "\b(and|begin|break|case|continue|else|end|for|function|if|in|not|or|return|select|shift|switch|while)\b"
color symbol "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|^|!|=|&|\|)"
color statement "\b(and|begin|case|else|end|for|function|if|in|not|or|select|shift|switch|while)\b"
color special "\b(break|continue|return)\b"
color symbol "(\;|`|\\|\$|<|>|^|!|=|&|\|)"
color symbol.brackets "\{|\}|\(|\)|\[|\]"
# Fish commands
color type "\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|source|status|string|trap|type|ulimit|umask|vared)\b"
@ -33,3 +34,6 @@ color identifier "\$\{?[0-9A-Za-z_!@#$*?-]+\}?"
# Comments & TODOs
color comment "(^|[[:space:]])#.*$"
color todo "(TODO|XXX|FIXME):?"
# Shebang
color preproc.shebang "^#!.+?( |$)"

View File

@ -1,6 +1,7 @@
syntax "git-config" "git(config|modules)$|\.git/config$"
color constant.bool "\b(true|false)\b"
color constant.bool.true "\btrue\b"
color constant.bool.false "\bfalse\b"
color statement "^[[:space:]]*[^=]*="
color constant "^[[:space:]]*\[.*\]$"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@ -3,10 +3,10 @@ syntax "glsl" "\.(frag|vert|fp|vp|glsl)$"
color identifier.class "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color type "\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\b"
color identifier "\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\b"
color statement "\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\b"
color special "\b(break|continue)\b"
color statement "\b(const|attribute|varying|uniform|in|out|inout|if|else|discard|while|for|do)\b"
color special "\b(break|continue|return)\b"
color constant.bool "\b(true|false)\b"
color symbol.operator "[-+/*=<>?:!~%&|^]"
color symbol.operator "[\-+/*=<>?:!~%&|^]"
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b"
color comment "(^|[[:space:]])//.*"
color comment start="/\*" end="\*/"

View File

@ -14,7 +14,7 @@ color symbol "(,|\.)"
color type "\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\b"
color type "\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\b"
##I'm... not sure, but aren't structs a type?
color type "\b(struct)\b"
color type.keyword "\b(struct)\b"
color constant.bool "\b(true|false|nil)\b"
# Brackets

View File

@ -38,7 +38,7 @@ color constant "\b(and|in|is|not|or|isnt|orIfNull)\b"
color constant.bool "\b(true|false)\b"
color constant "\b(null|undefined)\b"
color symbol.brackets "[-+/*=<>!~%&|^]|:="
color symbol.operator "[\-+/*=<>!~%&|^]|:="
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@ -1,14 +1,21 @@
## Here is a short improved example for HTML.
## Here is a short improved example for generic HTML.
##
syntax "html" "\.htm[l]?$"
color symbol "<|>"
color symbol.tag "<[^!].*?>"
color symbol "[:=]"
color error "<[^!].*?>"
color symbol.tag "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
color preproc "(?i)<[/]?(script|style)( .*)*?>"
color special "&[^;[[:space:]]]*;"
color constant.string ""[^"]*"|qq\|.*\|"
color statement "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
color constant.string.url "(ft(p|ps)|htt(p|ps)|git|chrome)://[^ ]+"
color symbol "[:=]"
color identifier "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
color constant.string ""[^"]*""
color constant.number "(?i)#[0-9A-F]{6,6}"
#Don't want or need tag highlighting outside of a tag! :)
color default start=">" end="<"
color symbol.tag "<|>"
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
color comment "<!--.+?-->"
color preproc "<!DOCTYPE.+?>"
# Bad possible work around for region-less regions.
#color default start=">" end="<"
# There's only so much we can do before regions and includes are implemented. :/

View File

@ -0,0 +1,21 @@
## Here is a short improved example for HTML.
##
## HTML 4 strict. (No html5 or depreciated html)
syntax "html4" "\.htm[l]?$"
header "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">"
color error "<[^!].*?>"
color symbol.tag "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
color preproc "(?i)<[/]?(script|style)( .*)*?>"
color special "&[^;[[:space:]]]*;"
color symbol "[:=]"
color identifier "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
color constant.string ""[^"]*""
color constant.number "(?i)#[0-9A-F]{6,6}"
#Don't want or need tag highlighting outside of a tag! :)
color default start=">" end="<"
color symbol.tag "<|>"
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
color comment "<!--.+?-->"
color preproc "<!DOCTYPE.+?>"

View File

@ -0,0 +1,23 @@
## Here is a short improved example for HTML.
##
syntax "html5" "\.htm[l]?$"
header "<!DOCTYPE html5>"
#Lint an invalid tag.
color error "<[^!].*?>"
color symbol.tag "(?i)<[/]?(a|a(bbr|ddress|rea|rticle|side|udio)|b|b(ase|d(i|o)|lockquote|r|utton)|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata|atalist|d|el|etails|fn|ialog|l|t)|em|embed|fieldset|fig(caption|ure)|form|iframe|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li|link|ma(in|p|rk)|menu|menuitem|met(a|er)|nav|noscript|o(bject|l|pt(group|ion)|utput)|p|param|picture|pre|progress|q|r(p|t|uby)|s|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u|ul|var|video|wbr)( .*)*?>"
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
color preproc "(?i)<[/]?(script|style)( .*)*?>"
color special "&[^;[[:space:]]]*;"
color symbol "[:=]"
color identifier "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
color constant.string ""[^"]*""
color constant.number "(?i)#[0-9A-F]{6,6}"
#Don't want or need tag highlighting outside of a tag! :)
color default start=">" end="<"
color symbol.tag "<|>"
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
color comment "<!--.+?-->"
color preproc "<!DOCTYPE.+?>"
# There's only so much we can do before regions and includes are implemented. :/

View File

@ -1,7 +1,8 @@
syntax "ini" "\.(ini|desktop|lfl|override)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$"
header "^\[[A-Za-z]+\]$"
color constant "\b(true|false)\b"
color constant.bool.true "\btrue\b"
color constant.bool.false "\bfalse\b"
color identifier "^[[:space:]]*[^=]*="
color special "^[[:space:]]*\[.*\]$"
color statement "[=;]"

View File

@ -3,7 +3,7 @@
syntax "java" "\.java$"
color type "\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\b"
color statement "\b(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\b"
color type "\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\b"
color type.keyword "\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\b"
color constant.string ""[^"]*""
color constant.bool "\b(true|false|null)\b"
color constant.number "\b[0-9]+\b"

View File

@ -1,8 +1,8 @@
syntax "javascript" "\.js$"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color constant.number "\b[\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[\-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+\-]?[0-9]+)?[fFlL]?"
color constant.number "\b[\-+]?([0-9]+[EePp][+\-]?[0-9]+)[fFlL]?"
color identifier "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color statement "\b(break|case|catch|continue|default|delete|do|else|finally)\b"
color statement "\b(for|function|get|if|in|instanceof|new|return|set|switch)\b"
@ -11,7 +11,7 @@ color constant.bool "\b(null|undefined|NaN)\b"
color constant.bool "\b(true|false)\b"
color type "\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\b"
color type "\b(Number|Object|RegExp|String)\b"
color symbol.operator "[-+/*=<>!~%?:&|]"
color symbol.operator "[\-+/*=<>!~%?:&|]"
color constant "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color constant "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color comment "(^|[[:space:]])//.*"

View File

@ -1,9 +1,9 @@
syntax "json" "\.json$"
header "^\{$"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color constant.number "\b[\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[\-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+\-]?[0-9]+)?[fFlL]?"
color constant.number "\b[\-+]?([0-9]+[EePp][+\-]?[0-9]+)[fFlL]?"
color constant.bool "\b(null)\b"
color constant.bool.true "\b(true)\b"
color constant.bool.false "\b(false)\b"

View File

@ -1,7 +1,7 @@
syntax "keymap" "\.(k|key)?map$|Xmodmap$"
color statement "\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\b"
color statement "\b(control|alt|shift)\b"
color identifier "\b(control|alt|shift)\b"
color constant.number "\b[0-9]+\b"
color symbol "="
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@ -5,6 +5,6 @@ color constant "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
color statement "^~ .*"
color identifier.var "^= .*"
color identifier "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?"
color identifier "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z_-]+(:[A-Za-z_-]+)*\)?"
color identifier "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z_\-]+(:[A-Za-z_\-]+)*\)?"
color symbol "[*!]"
color comment "^[[:space:]]*;.*"

View File

@ -1,19 +1,18 @@
syntax "lfe" "lfe$" "\.lfe$"
# Parens are everywhere!
color statement "\("
color statement "\)"
color symbol.brackets "\(|\)"
# Good overrides for LFE in particular
color type "defun|define-syntax|define|defmacro|defmodule|export"
# Dirty base cases stolen from the generic lisp syntax
color constant "\ [A-Za-z][A-Za-z0-9_-]+\ "
color symbol.operator "\(([-+*/<>]|<=|>=)|'"
color symbol.operator "\(([\-+*/<>]|<=|>=)|'"
color constant.number "\b[0-9]+\b"
color constant.string "\"(\\.|[^"])*\""
color special "['|`][A-Za-z][A-Za-z0-9_-]+"
color constant.string "\\.?"
color special "['|`][A-Za-z][A-Za-z0-9_\-]+"
color constant.specialChar "\\.?"
color comment "(^|[[:space:]]);.*"
# Some warning colors because our indents are wrong.

View File

@ -2,7 +2,7 @@ syntax "lilypond" "\.ly$" "\.ily$" "\.lly$"
color constant.number "\d+"
color identifier "[[:space:]](staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)[[:space:]]"
color statement "[-_^]?\\[-A-Za-z_]+"
color statement "[\-_^]?\\[\-A-Za-z_]+"
color preproc "\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\breve|\\longa|\\maxima)?([^\\\w]|_|\b)"
color symbol.brackets "[(){}<>]" "\[" "\]"
color constant.string "\".*\""

View File

@ -1,10 +1,10 @@
syntax "lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$"
color default "\([a-z-]+"
color symbol "\(([-+*/<>]|<=|>=)|'"
color symbol "\(([\-+*/<>]|<=|>=)|'"
color constant.number "\b[0-9]+b>"
color special "\bnil\b"
color brightcyan "\b[tT]b>"
color preproc "\b[tT]b>"
color constant.string "\"(\\.|[^"])*\""
color constant.specialChar "'[A-Za-z][A-Za-z0-9_-]+"
color constant.specialChar "\\.?"

View File

@ -43,7 +43,7 @@ color identifier "\:\b(close|flush|lines|read|seek|setvbuf|write)\b"
color constant.bool "\b(false|nil|true)\b"
# External files
color statement "(\b(dofile|require|include)|%q|%!|%Q|%r|%x)\b"
color preproc "(\b(dofile|require|include)|%q|%!|%Q|%r|%x)\b"
# Numbers
color constant.number "\b([0-9]+)\b"
@ -60,9 +60,6 @@ color constant start="\s*\[\[" end="\]\]"
# Escapes
color special "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)."
# Shebang
color comment "^#!.*"
# Simple brightblacks
color comment "\-\-.*$"

View File

@ -22,7 +22,7 @@ color symbol "^(---+|\+---+|===+|\+===+|___+|\*\*\*+|\+\*\*\*+)\s*$"
color statement "^#{1,6}.*"
# lists
color identifier "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
color identifier "^[[:space:]]*[\*+\-] |^[[:space:]]*[0-9]+\. "
# misc
color preproc "\b([CcRr]|[Tt][Mm])\b" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
@ -38,7 +38,7 @@ color underlined "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
color underlined.url "https?://[^ )>]+"
# code
color special "`.*?`|^ {4}[^-+*].*"
color special "`.*?`|^ {4}[^\-+*].*"
# code blocks
color symbol "^```$"

View File

@ -2,12 +2,18 @@
syntax "micro" "\.(micro)$"
color statement "\b(syntax|color(-link)?)\b"
color statement "\b(start=|end=)\b"
color identifier "\b(default|comment|symbol|identifier|constant(.string(.char)?|.specialChar|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column|tabbar)\b"
color type.keyword "\b(start=|end=)\b"
color identifier "\b(default|comment|symbol(.brackets|.tag)?|identifier|constant(.string(.char)?|.bool|.specialChar|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column|tabbar)\b"
color preproc "\b(syntax|header)\b"
color constant.number "\b(|h|A|0x)+[0-9]+(|h|A)+\b"
color constant.number "\b0x[0-9 a-f A-F]+\b"
color comment "#.*$"
#For better reverse compatibility with nanorc converted files.
color comment.bright "##.*$"
color constant.string ""(\\.|[^"])*""
color constant.number "#[0-9 A-F a-f]{1,6}"
#Fixed highlighting the first few digits of a full line comment as hex.
color comment "^#.*$"

View File

@ -3,7 +3,8 @@ header "^(server|upstream)[a-z ]*\{$"
color preproc "\b(events|server|http|location|upstream)[[:space:]]*\{"
color statement "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)"
color constant.bool "\b(on|off)\b"
color constant.bool.true "\b(on)\b"
color constant.bool.false "\b(off)\b"
color identifier "\$[A-Za-z][A-Za-z0-9_]*"
color symbol "[*]"
color constant-string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@ -12,7 +12,7 @@ color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin
color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b"
color statement "\b(for|if|while|do|else|case|default|switch)\b"
color statement "\b(try|throw|catch|operator|new|delete)\b"
color statement "\b(goto|continue|break|return)\b"
color special "\b(goto|continue|break|return)\b"
color statement "\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\b"
color statement "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
@ -26,7 +26,8 @@ color symbol.operator "[.:;,+*|=!\%\[\]]" "<" ">" "/" "-" "&"
color constant.number "\b(-?)?[0-9]+\b" "\b\[0-9]+\.[0-9]+\b" "\b0x[0-9A-F]+\b"
color constant "@\[(\\.|[^\]])*\]" "@\{(\\.|[^\}])*\}" "@\((\\.|[^\)])*\)"
color constant "\b<(\\.[^\b])*\b\b"
color constant "\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\b"
color constant.bool "\b(nil|NULL|YES|NO|TRUE|true|FALSE|false)\b"
color special "\b(self)\b"
color constant "\bk[[:alnum]]*\b"
color constant.string "\"(\\.|[^\"])*\"" "@\"(\\.|[^\"])*\"" "'.'"

View File

@ -14,7 +14,7 @@ color constant.number "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*"
### Decimal
color constant.number "-?\d[\d_]*.\d[\d_]*([eE][+-]\d[\d_]*.\d[\d_]*)?"
### Hexadecimal
color constant.number "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?"
color constant.number "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+\-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?"
# Comments
color comment start="\(\*" end="\*\)"

View File

@ -12,7 +12,7 @@ color constant "\b(?i:(false|true|nil))\b"
color special start="asm" end="end"
color constant.number "\$[0-9A-Fa-f]+" "\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
color constant.number "\$[0-9A-Fa-f]+" "\b[+\-]?[0-9]+([.]?[0-9]+)?(?i:e[+\-]?[0-9]+)?"
color constant.string "#[0-9]{1,}"
color constant.string "'(?:[^']+|'')*'"
@ -20,4 +20,4 @@ color preproc start="{\$" end="}"
color comment "//.*"
color comment start="\(\*" end="\*\)"
color comment start="({)(?:[^$])" end="}"
color comment start="({)(?:[^$])" end="}"

View File

@ -6,7 +6,7 @@ header "^#!.*/(env +)?perl( |$)"
color type "\b(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\b" "\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\b" "\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\b" "\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\b" "\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\b"
color statement "\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\b"
#TODO: This regex needs to be fixed.
color identifier (i) start="[$@%]" end="( |[^0-9A-Z_]|-)"
color identifier start="[$@%]" end="((?i) |[^0-9A-Z_]|-)"
#ENDTODO.
color constant.string "".*"|qq\|.*\|"
color default "[sm]/.*/"

View File

@ -1,36 +1,66 @@
#This file probably needs cleanup!!
syntax "php" "\.php[2345s~]?$"
color symbol.brackets "<.+?>"
color preproc "<\?(php|=)?"
color preproc "\?>"
#color preproc start="<\?(php|=)?" end="\?>"
#Broken! Don't enable!
#color default start="<.+?>" end="<.+?>"
color symbol.operator "<|>"
color error "<[^!].*?>"
color symbol.tag "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>"
color preproc "(?i)<[/]?(script|style)( .*|>)*?>"
#Highlighting from html land
color special "&[^;[[:space:]]]*;"
color symbol "[:=]"
color identifier "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
color constant.string ""[^"]*""
color constant.number "(?i)#[0-9A-F]{6,6}"
#Don't want or need tag highlighting outside of a tag! :)
#color default start=">" end="<"
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
color comment "<!--.+?-->"
#Reset highlighting to begin php
color default "<\?(php|=)" end="\?>"
color identifier.class "([a-zA-Z0-9_-]+)\("
color type "(var|class|goto|extends|function|echo|case|break|default|exit|switch|foreach|endforeach|while|const|static|extends|as|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)[\s|\)]"
color preproc "(require|include|require_once|include_once)"
color type "\b(var|class|extends|function|echo|case|default|exit|switch|extends|as|define|do|declare|in|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)\b"
color identifier.class "[a-zA-Z\\]+::"
color identifier "new\s([a-zA-Z0-9\\]+)"
color identifier "([A-Z][a-zA-Z0-9_]+)\s"
color identifier "([A-Z0-9_]+)[;|\s|\)|,]"
color statement "(implements|abstract|global|public|instanceof|private|protected|static|if|else|elseif|endif|namespace|use|as|new|throw|catch|try|return)[\s|;]"
color type.keyword "(global|public|private|protected|static|const)"
color statement "(implements|abstract|instanceof|if|else(if)?|endif|namespace|use|as|new|throw|catch|try|while|print|(end)?(foreach)?)\b"
color identifier "new\s([a-zA-Z0-9\\]+)"
color special "(break|continue|goto|return)"
color constant.bool "(true|false|null|TRUE|FALSE|NULL)"
color constant "[\s|=|>|\s|\(|/|+|-|\*|\[](\d+)"
color constant "[\s|=|\s|\(|/|+|-|\*|\[]"
color constant.number "[0-9]"
color identifier "(\$this|parent|self|\$this->)"
color symbol.operator "(=>|===|!==|==|!=|&&|\|\||::|=|->|\!)"
color identifier.var "(\$[a-zA-Z0-9\-_]+)"
color symbol.operator "[\(|\)|/|+|-|\*|\[|,|;]"
color symbol.operator "[\(|\)|/|+|\-|\*|\[|.|,|;]"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\[abfnrtv'\"\\]"
color symbol.brackets "(\[|\]|\{|\}|[()])"
color comment "(^|[[:space:]])//.*"
color comment "(^|[[:space:]])#.*"
color comment start="/\*" end="\*/"
color preproc "<\?(php|=)?"
color preproc "\?>"
color preproc "<!DOCTYPE.+?>"

View File

@ -20,7 +20,7 @@ color statement "\b(is|isnt|not|and|or|xor)\b"
color type "\b(_*[A-Z][_a-zA-Z0-9\']*)\b"
color constant "\b(this)\b"
color constant "\b(true|false)\b"
color constant.bool "\b(true|false)\b"
color constant.number "\b((0b[0-1_]*)|(0o[0-7_]*)|(0x[0-9a-fA-F_]*)|([0-9_]+(\.[0-9_]+)?((e|E)(\\+|-)?[0-9_]+)?))\b"
color constant.string ""(\\.|[^"])*""

View File

@ -30,7 +30,7 @@ color special "\$\{[^}]*\}"
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Comments
color comment "#[^{].*$" "#$"
color comment "##[^{].*$" "##$"
color comment.bright "##[^{].*$" "##$"
## Some common markers
color todo "(XXX|TODO|FIXME|\?\?\?)"
## Trailing spaces

View File

@ -21,7 +21,9 @@ color type "\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|e
## definitions
color identifier "def [a-zA-Z_0-9]+"
## keywords
color statement "\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\b"
color preproc "\b(import)\b"
color statement "\b(and|as|assert|class|def|del|elif|else|except|finally|for|from|global|if|in|is|lambda|not|or|pass|print|raise|try|while|with|yield)\b"
color special "\b(break|continue|return)\b"
## decorators
color special "@.*[(]"
@ -44,3 +46,6 @@ color comment "#.*$"
## block brightblacks
color comment start=""""([^"]|$)" end="""""
color comment start="'''([^']|$)" end="'''"
## Shebang
color preproc.shebang "^#!.+?( |$)"

View File

@ -21,16 +21,18 @@ color type "\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|fl
## definitions
color identifier "def [a-zA-Z_0-9]+"
## keywords
color statement "\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b"
color preproc "\b(import)\b"
color statement "\b(and|as|assert|class|def|del|elif|else|except|finally|for|from|global|if|in|is|lambda|nonlocal|not|or|pass|raise|try|while|with|yield)\b"
color special "\b(break|continue|return)\b"
## decorators
color special "@.*[(]"
## operators
color statement "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
color symbol.operator "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
## parentheses
color statement "[(){}]" "\[" "\]"
color symbol.brackets "[(){}]" "\[" "\]"
## numbers
color constant.number "\b[0-9]+\b"
@ -44,3 +46,6 @@ color comment "#.*$"
## block brightblacks
color comment start=""""([^"]|$)" end="""""
color comment start="'''([^']|$)" end="'''"
## Shebang
color preproc.shebang "^#!.+?( |$)"

View File

@ -1,27 +1,42 @@
## For reST
syntax "rst" "\.rest$" "\.rst$"
# Lists, bulleted and enumerated
color identifier "^[\*+\-] "
color identifier "^[0-9]+?\. "
# italics
#color magenta "\*[^*]\*"
color type "\*[^*]+?\*"
# bold
color red "\*\*[^*]+\*\*"
color type.keyword "\*\*[^\*]+\*\*"
# code block
color brightred "::"
color symbol "::"
# link reference
color blue "`[^`]+`_{1,2}"
color underlined.url "`[^`]+`_{1,2}"
# code
color yellow "``[^`]+``"
color special "``[^`]+``"
# directives or comments
color cyan "^\.\. .*$"
color comment "^\.\. .*$"
# anon link targets
color cyan "^__ .*$"
color underlined "^__ .*$"
# h1
color yellow "^###+$"
color yellow "^\*\*\*+$"
color statement "^###+$"
color statement "^\*\*\*+$"
# h2
color magenta "^===+$"
color preproc "^===+$"
# h3
color red "^---+$"
color identifier "^---+$"
# h4
color green "^\^\^\^+$"
color type.keyword "^\^\^\^+$"
# h5
color blue "^"""+$"
color constant "^"""+$"
# urls
color underlined.url "http(s)?://[^ )>]+"
#Tables
color preproc "\+[\-=+]+\+"
color preproc "\|"
# I went and looked up an reStructured Text Specification.
# I really hope I got the right one. I tried to align
# color choices with the ones for markdown and asciidoc

View File

@ -26,9 +26,11 @@ color special "#\{[^}]*\}"
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Comments
color comment "#[^{].*$" "#$"
color comment "##[^{].*$" "##$"
color comment.bright "##[^{].*$" "##$"
## "Here" docs
color constant.macro start="<<-?'?EOT'?" end="^EOT"
## Some common markers
color todo "(XXX|TODO|FIXME|\?\?\?)"
## Color the shebang
color preproc.shebang "^#!.+?( |$)"

View File

@ -5,7 +5,7 @@ color type "\b(boolean|byte|char|double|float|int|long|new|short|this|transient|
color statement "\b(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\b"
color statement "\b(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\b"
color constant.string ""[^"]*""
color constant "\b(true|false|null)\b"
color constant.bool "\b(true|false|null)\b"
color comment "//.*"
color comment start="/\*" end="\*/"
color comment.bright start="/\*\*" end="\*/"

View File

@ -34,3 +34,6 @@ color identifier.var "\$\{?[0-9A-Za-z_!@#$*?-]+\}?"
# Comments & TODOs
color comment "(^|[[:space:]])#.*$"
color todo "(TODO|XXX|FIXME):?"
# Shebang
color preproc.shebang "^#!.+?( |$)"

View File

@ -11,7 +11,7 @@ color default "salt:"
# Numbers, etc
color constant.number "/*[0-9]/*"
color constant "\b(True|False)\b"
color constant.bool "\b(True|False)\b"
# Anything between two single quotes
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@ -1,29 +1,29 @@
syntax "sql" "\.sql$" "sqliterc$"
color statement (i) "\b(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\b"
color statement (i) "\b(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\b"
color statement (i) "\b(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\b"
color statement (i) "\b(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\b"
color statement (i) "\b(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\b"
color statement (i) "\b(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\b"
color statement (i) "\b(GROUP|GRANT|HAVING)\b"
color statement (i) "\b(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\b"
color statement (i) "\b(JOIN|KEYS|KILL|KEY)\b"
color statement (i) "\b(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\b"
color statement (i) "\b(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\b"
color statement (i) "\b(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\b"
color statement (i) "\b(PROCEDURE|PROCEDURAL|PRIMARY)\b"
color statement (i) "\b(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\b"
color statement (i) "\b(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\b"
color statement (i) "\b(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\b"
color statement (i) "\b(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\b"
color statement (i) "\b(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\b"
color type "\b(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\b"
color statement "(?i)\b(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\b"
color statement "(?i)\b(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\b"
color statement "(?i)\b(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\b"
color statement "(?i)\b(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\b"
color statement "(?i)\b(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\b"
color statement "(?i)\b(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\b"
color statement "(?i)\b(GROUP|GRANT|HAVING)\b"
color statement "(?i)\b(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\b"
color statement "(?i)\b(JOIN|KEYS|KILL|KEY)\b"
color statement "(?i)\b(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\b"
color statement "(?i)\b(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\b"
color statement "(?i)\b(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\b"
color statement "(?i)\b(PROCEDURE|PROCEDURAL|PRIMARY)\b"
color statement "(?i)\b(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\b"
color statement "(?i)\b(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\b"
color statement "(?i)\b(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\b"
color statement "(?i)\b(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\b"
color statement "(?i)\b(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\b"
color type "(?i)\b(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\b"
# SQLite meta commands
color preproc (i) "\.\b(databases|dump|echo|exit|explain|header(s)?|help)\b"
color preproc (i) "\.\b(import|indices|mode|nullvalue|output|prompt|quit|read)\b"
color preproc (i) "\.\b(schema|separator|show|tables|timeout|width)\b"
color preproc "(?i)\.\b(databases|dump|echo|exit|explain|header(s)?|help)\b"
color preproc "(?i)\.\b(import|indices|mode|nullvalue|output|prompt|quit|read)\b"
color preproc "(?i)\.\b(schema|separator|show|tables|timeout|width)\b"
color constant.bool "\b(ON|OFF)\b"
color constant.number "\b([0-9]+)\b"

View File

@ -12,8 +12,8 @@ color statement "(class|import|let|var|struct|enum|func|if|else|switch|case|def
color statement "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\ "
# Keywords
color statement "(print)"
color statement "(init)"
color preproc "(print)"
color preproc "(init)"
# Numbers
color constant.number "([0-9]+)"

View File

@ -1,8 +1,8 @@
syntax "typescript" "\.ts$"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color constant.number "\b[\-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[\-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+\-]?[0-9]+)?[fFlL]?"
color constant.number "\b[\-+]?([0-9]+[EePp][+\-]?[0-9]+)[fFlL]?"
color identifier.class "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color statement "\b(abstract|as|async|await|break|case|catch|class|const|constructor|continue)\b"
color statement "\b(debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from)\b"
@ -13,7 +13,7 @@ color constant.bool "\b(false|true|null|undefined|NaN)\b"
color type "\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\b"
color type "\b(Number|Object|RegExp|String|Symbol)\b"
color type "\b(any|boolean|never|number|string|symbol)\b"
color symbol.operator "[-+/*=<>!~%?:&|]"
color symbol.operator "[\-+/*=<>!~%?:&|]"
color constant "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color constant "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color comment "(^|[[:space:]])//.*"

View File

@ -9,7 +9,7 @@ color statement "\b(class|override|private|public|signal|this|weak)\b"
color special "\b(goto|break|continue)\b"
color constant.bool "\b(true|false)\b"
color constant.number "\b([0-9]+)\b"
color symbol.operator "[-+/*=<>?:!~%&|]" "->"
color symbol.operator "[\-+/*=<>?:!~%&|]" "->"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])//.*"
color comment start="/\*" end="\*/"

View File

@ -40,7 +40,7 @@ color symbol.operator "(\+|-|\*|/|&|<|>|=|\.|:)"
## constants
color constant.number "(?i)'([0-1]|u|x|z|w|l|h|-)'" "[box]?"([0-1a-fA-F]|u|x|z|w|l|h|-)+""
color constant.number "(?i)\b[0-9\._]+(e[-]?[0-9]+)?( ?[fpnum]?s)?\b"
color constant.number "(?i)\b[0-9\._]+(e[\-]?[0-9]+)?( ?[fpnum]?s)?\b"
color constant.bool "(?i)\b(true|false)\b"
## severity levels
color constant "(?i)\b(note|warning|error|failure)\b"

View File

@ -40,3 +40,6 @@ color comment.bright "(^|[[:space:]])##.*$"
## Trailing spaces
color indent-char.whitespace "[[:space:]]+$"
##Shebang
color preproc.shebang "^#!.+?( |$)"