@@ -0,0 +1,141 @@
1+; Function calls
2+
3+(call_expression
4+ function: (identifier) @function)
5+
6+(call_expression
7+ function: (selector_expression
8+ field: (field_identifier) @function))
9+
10+
11+; ; Function definitions
12+
13+(function_declaration
14+ name: (identifier) @function)
15+
16+(proc_group
17+ (identifier) @function)
18+
19+; ; Identifiers
20+
21+(type_identifier) @type
22+(field_identifier) @variable.other.member
23+(identifier) @variable
24+
25+(const_declaration
26+ (identifier) @constant)
27+(const_declaration_with_type
28+ (identifier) @constant)
29+
30+"any" @type
31+
32+(directive_identifier) @constant
33+
34+; ; Operators
35+
36+[
37+ "?"
38+ "-"
39+ "-="
40+ ":="
41+ "!"
42+ "!="
43+ "*"
44+ "*"
45+ "*="
46+ "/"
47+ "/="
48+ "&"
49+ "&&"
50+ "&="
51+ "%"
52+ "%="
53+ "^"
54+ "+"
55+ "+="
56+ "<-"
57+ "<"
58+ "<<"
59+ "<<="
60+ "<="
61+ "="
62+ "=="
63+ ">"
64+ ">="
65+ ">>"
66+ ">>="
67+ "|"
68+ "|="
69+ "||"
70+ "~"
71+ ".."
72+ "..<"
73+ "..="
74+ "::"
75+] @operator
76+
77+; ; Keywords
78+
79+[
80+ ; "asm"
81+ "auto_cast"
82+ ; "bit_set"
83+ "cast"
84+ ; "context"
85+ ; "or_else"
86+ ; "or_return"
87+ "in"
88+ ; "not_in"
89+ "distinct"
90+ "foreign"
91+ "transmute"
92+ ; "typeid"
93+
94+ "break"
95+ "case"
96+ "continue"
97+ "defer"
98+ "else"
99+ "using"
100+ "when"
101+ "where"
102+ "fallthrough"
103+ "for"
104+ "proc"
105+ "if"
106+ "import"
107+ "map"
108+ "package"
109+ "return"
110+ "struct"
111+ "union"
112+ "enum"
113+ "switch"
114+ "dynamic"
115+] @keyword
116+
117+; ; Literals
118+
119+[
120+ (interpreted_string_literal)
121+ (raw_string_literal)
122+ (rune_literal)
123+] @string
124+
125+(escape_sequence) @constant.character.escape
126+
127+(int_literal) @constant.numeric.integer
128+(float_literal) @constant.numeric.float
129+(imaginary_literal) @constant.numeric
130+
131+[
132+ (true)
133+ (false)
134+] @constant.builtin.boolean
135+
136+[
137+ (nil)
138+ (undefined)
139+] @constant.builtin
140+
141+(comment) @comment.line