From abedd12f9ec31bb9c2eb462d9610002b87b2aad4 Mon Sep 17 00:00:00 2001 From: Mal Date: Wed, 25 May 2022 23:00:32 +0200 Subject: [PATCH] Javascript added --- javascript.nanorc | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 javascript.nanorc diff --git a/javascript.nanorc b/javascript.nanorc new file mode 100644 index 0000000..cb741f7 --- /dev/null +++ b/javascript.nanorc @@ -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:]]+$"