Javascript added

This commit is contained in:
Mal 2022-05-25 23:00:32 +02:00
parent 871450887a
commit abedd12f9e
1 changed files with 55 additions and 0 deletions

55
javascript.nanorc Normal file
View File

@ -0,0 +1,55 @@
#
# MONOKAI like theme for javascript
#
# This theme uses extended colors of the gnome terminal. The standard command line
# may not reproduce the desired colors!
#
# A default gnome terminal theme could have unintended effects of the theme colors
# as well. Please use the default one!
syntax javascript "\.js$"
comment "//"
color white ".*"
# Parameters inside function definitions
color orange "function \w+\(.*\)"
# Function or method calls
color cyan "\w+\("
# Function/method names on definitions
color green "function \w+\("
color green "@\w+"
color green "[[:blank:]]+\w+\(.*[^;]$"
# Parameters inside method definitions
color orange "\([a-zA-Z_0-9,= ]+\)( *\{|$)"
# Class initialization
color white "new \w+\("
# Statements
color brightcyan "\<(class|function|extends|import|export|default|from|new|var|let|const|return|for|while|in|of|if|elseif|else|throw|continue|break|try|catch|switch|static|typeof|do|async|await)\>"
# Operators
color red "(=|·|\/|\+|-|\*|\!|>|<|:|\?|&|\|)"
# Special values
color magenta "\<(true|false|NaN|null|undefined)\>"
# Re-whitening certain symbols
color white "(\(|\)|,|\.|\{|\}|;)"
# Number values
color brightmagenta "([0-9]|[0-9]+\.[0-9]+|this)"
# Strings.
color yellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'|`([^`\]|\\.)*`"
# Comments.
color grey "(^|[[:blank:]])//.*"
color grey start="/\*" end="\*/"
# Redundant spaces
color brightred,brightred "[[:space:]]+$"