From c0e8dceb5debc9471ac536c3d7077b62d3167c9b Mon Sep 17 00:00:00 2001 From: SeerLite Date: Wed, 17 Mar 2021 23:59:05 -0300 Subject: [PATCH] js: Highlight special variables at start of file --- rc/filetype/javascript.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/javascript.kak b/rc/filetype/javascript.kak index bbea437f..b208c8a6 100644 --- a/rc/filetype/javascript.kak +++ b/rc/filetype/javascript.kak @@ -91,7 +91,7 @@ define-command -hidden init-javascript-filetype -params 1 %~ add-highlighter "shared/%arg{1}/literal/" fill string add-highlighter "shared/%arg{1}/literal/" regex \$\{.*?\} 0:value - add-highlighter "shared/%arg{1}/code/" regex [^$_]\b(document|false|null|parent|self|this|true|undefined|window)\b 1:value + add-highlighter "shared/%arg{1}/code/" regex (?:^|[^$_])\b(document|false|null|parent|self|this|true|undefined|window)\b 1:value add-highlighter "shared/%arg{1}/code/" regex "-?\b[0-9]*\.?[0-9]+" 0:value add-highlighter "shared/%arg{1}/code/" regex \b(Array|Boolean|Date|Function|Number|Object|RegExp|String|Symbol)\b 0:type