From 1882d76392e3f1ccba66759ce3a7bb0ecbe99c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C4=83zvan=20C=2E=20R=C4=83dulescu?= Date: Wed, 22 Mar 2023 06:24:23 +0200 Subject: [PATCH] Add unique names (%NodeName) highlight for Godot v4.x GDScript --- rc/filetype/gdscript.kak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rc/filetype/gdscript.kak b/rc/filetype/gdscript.kak index 4047a177..760e3c26 100644 --- a/rc/filetype/gdscript.kak +++ b/rc/filetype/gdscript.kak @@ -67,8 +67,6 @@ add-highlighter shared/gdscript/code/ regex @\w+ # special case of get =, set = add-highlighter shared/gdscript/code/ regex (get)\h*=\h*(\w+) 1:keyword 2:function add-highlighter shared/gdscript/code/ regex (set)\h*=\h*(\w+) 1:keyword 2:function -# nodes -add-highlighter shared/gdscript/code/ regex \$[\w/]* 0:module # keywords and built-ins evaluate-commands %sh{ keywords="as await break breakpoint class class_name const continue elif else enum extends for func if is match pass return self signal static super var void while" @@ -98,6 +96,9 @@ evaluate-commands %sh{ add-highlighter shared/gdscript/code/ regex '\b($(join "${gdscript_constants}" '|'))\b' 0:keyword " } +# nodes +add-highlighter shared/gdscript/code/ regex \$[\w/]+\b 0:module +add-highlighter shared/gdscript/code/ regex \%\w+(?!/)\b 0:string # Commands # ‾‾‾‾‾‾‾‾