nano/syntax/javascript.nanorc

19 lines
600 B
Plaintext
Raw Normal View History

## Here is an example for Javascript.
syntax "javascript" "\.js$"
comment "//"
color green "\<(async|class|const|extends|function|let|this|typeof|var|void)\>"
color brightyellow "\<(do|while|if|else|switch|case|default|for|each|in|of|with)\>"
color brightyellow "\<(await|export|import|throw|try|catch|finally|new|delete)\>"
color magenta "\<(break|continue|return|yield)\>"
# Strings.
color brightmagenta ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`"
# Comments.
color brightblue "(^|[[:space:]])//.*"
color brightblue start="/\*" end="\*/"
# Trailing whitespace.
color ,green "[[:space:]]+$"