diff --git a/rc/filetype/gdscript.kak b/rc/filetype/gdscript.kak index 1dfa2fbc..4047a177 100644 --- a/rc/filetype/gdscript.kak +++ b/rc/filetype/gdscript.kak @@ -36,36 +36,42 @@ provide-module gdscript %§ add-highlighter shared/gdscript regions add-highlighter shared/gdscript/code default-region group -add-highlighter shared/gdscript/string region -match-capture ("|'|"""|''') (?]+?>)?\( 1:function +add-highlighter shared/gdscript/code/ regex _?[a-zA-Z]\w*\s*(?=\() 0:function +add-highlighter shared/gdscript/code/ regex (?:func\h+)(_?\w+)(?:<[^>]+?>)?\( 1:function # operators -add-highlighter shared/gdscript/code/ regex '(?:\+|-|\*|/|%|=|<|>|&|\||\^|~|:=)' 0:operator +add-highlighter shared/gdscript/code/ regex \+|-|\*|/|%|=|<|>|&|\||\^|~|:= 0:operator # constants & enums -add-highlighter shared/gdscript/code/ regex \b[A-Z0-9_]+\b 0:variable - - +add-highlighter shared/gdscript/code/ regex \b[A-Z_][A-Z0-9_]*\b 0:variable +# annotations +add-highlighter shared/gdscript/code/ regex @\w+ 0:attribute +# 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 const continue elif else enum extends for func if is match name pass return self signal static super var void while" + 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" values="false true null" @@ -93,17 +99,6 @@ evaluate-commands %sh{ " } -# annotations -add-highlighter shared/gdscript/code/ regex '@\w+' 0:attribute - -# 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 - - # Commands # ‾‾‾‾‾‾‾‾