Highlight all uppercase words for constants & enums Godot v4.x GDScript

This commit is contained in:
Răzvan C. Rădulescu 2023-03-20 07:31:08 +02:00
parent 80f0cda8b5
commit d6326f609c

View File

@ -58,8 +58,11 @@ add-highlighter shared/gdscript/code/ regex '\b\d+\.' 0:
# functions # functions
add-highlighter shared/gdscript/code/ regex _?[a-zA-Z]\w*\s*(?=\() 0: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 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
evaluate-commands %sh{ 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 const continue elif else enum extends for func if is match name pass return self signal static super var void while"