@@ -1,7 +1,8 @@
11; Identifier naming conventions
22
3−((identifier) @constant
4− (#match? @constant "^[A-Z][A-Z_]*$"))
3+(
4+ (identifier) @constant
5+ (#match? @constant "^[A-Z][A-Z\\d_]+$"))
56
67; class
78(class_name_statement (name) @type)
@@ -11,32 +12,35 @@
1112; Function calls
1213
1314(attribute_call (identifier) @function)
14−
1515(base_call (identifier) @function)
16−
1716(call (identifier) @function)
1817
1918; Function definitions
2019
2120(function_definition (name) @function)
22−
2321(constructor_definition "_init" @function)
2422
23+
2524;; Literals
26−(integer) @constant.numeric.integer
27−(float) @constant.numeric.float
2825(comment) @comment
2926(string) @string
30−(escape_sequence) @constant.character.escape
31−(identifier) @variable
27+
3228(type) @type
29+(expression_statement (array (identifier) @type))
30+(binary_operator (identifier) @type)
3331
34−;; Literals
32+(variable_statement (identifier) @variable)
33+(get_node) @label
34+
35+(const_statement (name) @constant)
36+(integer) @constant.numeric.integer
37+(float) @constant.numeric.float
38+(escape_sequence) @constant.character.escape
3539[
3640 (true)
3741 (false)
38− (null)
39−] @constant.builtin
42+] @constant.builtin.boolean
43+(null) @constant.builtin
4044
4145[
4246 "+"
@@ -62,37 +66,67 @@
6266 "~"
6367 "<<"
6468 ">>"
65− "and"
66− "or"
67− "not"
6869] @operator
6970
71+(annotation (identifier) @keyword.storage.modifier)
72+
7073[
71− (static_keyword)
72− (remote_keyword)
73− (tool_statement)
74− "var"
75− "func"
76− "setget"
77− "in"
78− "is"
79− "as"
8074 "if"
8175 "else"
8276 "elif"
77+] @keyword.control.conditional
78+
79+[
8380 "while"
8481 "for"
82+] @keyword.control.repeat
83+
84+[
8585 "return"
86+ "pass"
8687 "break"
8788 "continue"
88− "pass"
89+] @keyword.control.return
90+
91+[
92+ "func"
93+] @keyword.control.function
94+
95+[
96+ "export"
97+] @keyword.control.import
98+
99+[
100+ "in"
101+ "is"
102+ "as"
89103 "match"
104+ "and"
105+ "or"
106+ "not"
107+] @keyword.operator
108+
109+[
110+ "var"
90111 "class"
91112 "class_name"
92113 "enum"
114+] @keyword.storage.type
115+
116+
117+[
118+ (remote_keyword)
119+ (static_keyword)
120+ "const"
93121 "signal"
122+ "@"
123+] @keyword.storage.modifier
124+
125+[
126+ "setget"
94127 "onready"
95− "export"
96128 "extends"
97− "const"
129+ "set"
130+ "get"
98131] @keyword
132+