Skip to content

Instantly share code, notes, and snippets.

@tsabunkar
Created May 16, 2021 09:29
Show Gist options
  • Save tsabunkar/451981104cd2273f3368f2b7445f0442 to your computer and use it in GitHub Desktop.
Save tsabunkar/451981104cd2273f3368f2b7445f0442 to your computer and use it in GitHub Desktop.
Nano Syntax Highlighting for Nodejs, Javascript or JS language
## BL's version for ES6 or ES2015
syntax "JavaScript" "\.js$"
color brightgreen "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
color brightgreen "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color brightgreen "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color brightgreen "\<(null|undefined|NaN|Infinity)\>"
color brightgreen "\<(true|false)\>"
color cyan "\<(break|case|catch|class|const|continue|debugger|default|delete|do|)\>"
color cyan "\<(else|export|extends|finally|for|function|if|import|in|instanceof|new|return)\>"
color cyan "\<(super|switch|this|throw|try|typeof|var|void|while|with|yield)\>"
color cyan "\<(enum|implements|interface|let|package|private|protected|pubic|static)\>"
color cyan "\<(async|await)\>"
color brightcyan "\<(global|process|console|setTimeout|clearTimeout|setInterval|clearInterval)\>"
color brightcyan "\<(module|exports|require)\>"
color brightcyan "\<(eval|uneval|isFinite|isNaN|parseFloat|parseInt|decodeURI)\>"
color brightcyan "\<(decodeURIComponent|encodeURI|encodeURIComponent)\>"
color brightcyan "\<(Array|Date|Math|Number|Object|String)\>"
color brightmagenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color brightblack start="/\*" end="\*/"
color brightblack "//.*$"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta start="`" end="`"
color white "\<(this)\>"
color brightred "\<(let|const|var)\>"
color brightwhite "\<(constructor)\>"
color brightyellow ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment