59 lines
2.4 KiB
Text
59 lines
2.4 KiB
Text
syntax "JavaScript" "\.js$"
|
|
|
|
# Resets everything back to plain text coloring.
|
|
# Can be used at the start of each theme file.
|
|
color white "^.*$"
|
|
|
|
color brightblue "\<[A-Z_]+\>"
|
|
color brightblue "(const|var|let)[[:space:]]+.+?[[:space:]]*="
|
|
color white "\(?function[[:space:]]*\(.*?\)"
|
|
color yellow "[-+/*=<>!~%?:&|]"
|
|
color red "\?.+:"
|
|
color red "=>"
|
|
color brightwhite "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
|
|
color brightwhite "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
color brightwhite "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
|
color cyan "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
|
color white "[(]"
|
|
color red "\<(abstract|arguments|boolean|break|byte|case|catch|char|class|const|continue)\>"
|
|
color red "\<(debugger|default|delete|do|double|else|enum|eval|export|extends|false|final)\>"
|
|
color red "\<(finally|float|for|function|goto|if|implements|import|in|instanceof|int|interface)\>"
|
|
color red "\<(let|long|native|new|package|private|protected|public|return|short|static|super)\>"
|
|
color red "\<(switch|synchronized|this|throw|throws|transient|true|try|typeof|var|void|volatile)\>"
|
|
color red "\<(while|with|yield)\>"
|
|
color brightwhite "\<(null|undefined|NaN)\>"
|
|
color brightwhite "\<(true|false)\>"
|
|
color brightblue "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
|
|
color brightblue "\<(Number|Object|RegExp|String)\>"
|
|
color white "[A-Za-z_][A-Za-z0-9_]+:"
|
|
color white "\?\."
|
|
color green ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
|
color green start="`" end="`"
|
|
color yellow "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
|
|
color yellow "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
|
|
color brightblack "(^|[[:space:]])//.*"
|
|
color brightblack start="/\*" end="\*/"
|
|
comment "//"
|
|
color brightwhite,cyan "\<TODO\>:?"
|
|
color brightwhite,cyan "\<FIXME\>:?"
|
|
color ,red "[[:space:]]+$"
|
|
color brightyellow " + +| + +"
|
|
|
|
# rainbow indent
|
|
color ,brightblack "^[[:space:]]{32}"
|
|
color ,black "^[[:space:]]{30}"
|
|
color ,brightblack "^[[:space:]]{28}"
|
|
color ,black "^[[:space:]]{26}"
|
|
color ,brightblack "^[[:space:]]{24}"
|
|
color ,black "^[[:space:]]{22}"
|
|
color ,brightblack "^[[:space:]]{20}"
|
|
color ,black "^[[:space:]]{18}"
|
|
color ,brightblack "^[[:space:]]{16}"
|
|
color ,black "^[[:space:]]{14}"
|
|
color ,brightblack "^[[:space:]]{12}"
|
|
color ,black "^[[:space:]]{10}"
|
|
color ,brightblack "^[[:space:]]{8}"
|
|
color ,black "^[[:space:]]{6}"
|
|
color ,brightblack "^[[:space:]]{4}"
|
|
color ,black "^[[:space:]]{2}"
|
|
|