@@ -43,88 +43,252 @@ folds: [
4343scopes :
4444 ' source_file' : ' source.go'
4545
46- ' comment' : ' comment.block'
46+ # Keyword
47+ ' "if"' : ' keyword.control.condition'
48+ ' "else"' : ' keyword.control.condition'
49+ ' "switch"' : ' keyword.control.condition'
50+ ' "select"' : ' keyword.control.condition'
51+ ' "case"' : ' keyword.control.condition'
52+ ' "fallthrough"' : ' keyword.control.condition'
53+ ' "default"' : ' keyword.control.condition'
54+ ' "for"' : ' keyword.control.loop'
55+ ' "range"' : ' keyword.control.loop'
56+ ' "break"' : ' keyword.control.jump'
57+ ' "return"' : ' keyword.control.jump'
58+ ' "continue"' : ' keyword.control.jump'
59+ ' "goto"' : ' keyword.control.jump'
60+ ' "defer"' : ' keyword.control.jump'
61+ ' "go"' : ' keyword.control.jump'
62+ ' "package"' : ' keyword.control.directive'
63+ ' "import"' : ' keyword.control.package'
64+
65+ ' "+"' : ' keyword.operator.arithmetic.symbolic'
66+ ' "-"' : ' keyword.operator.arithmetic.symbolic'
67+ ' binary_expression > "*"' : ' keyword.operator.arithmetic.symbolic'
68+ ' "/"' : ' keyword.operator.arithmetic.symbolic'
69+ ' "%"' : ' keyword.operator.arithmetic.symbolic'
70+ ' "++"' : ' keyword.operator.arithmetic.symbolic'
71+ ' "--"' : ' keyword.operator.arithmetic.symbolic'
72+
73+ ' binary_expression > "&"' : ' keyword.operator.bitwise.symbolic'
74+ ' "|"' : ' keyword.operator.bitwise.symbolic'
75+ ' "^"' : ' keyword.operator.bitwise.symbolic'
76+ ' "&^"' : ' keyword.operator.bitwise.symbolic'
77+ ' "<<"' : ' keyword.operator.bitwise.shift.symbolic'
78+ ' ">>"' : ' keyword.operator.bitwise.shift.symbolic'
79+
80+ ' "="' : ' keyword.operator.assignment.symbolic'
81+ ' ":="' : ' keyword.operator.assignment.symbolic'
82+ ' "+="' : ' keyword.operator.assignment.compound.symbolic'
83+ ' "-="' : ' keyword.operator.assignment.compound.symbolic'
84+ ' "*="' : ' keyword.operator.assignment.compound.symbolic'
85+ ' "/="' : ' keyword.operator.assignment.compound.symbolic'
86+ ' "%="' : ' keyword.operator.assignment.compound.symbolic'
87+ ' "&="' : ' keyword.operator.assignment.compound.symbolic'
88+ ' "|="' : ' keyword.operator.assignment.compound.symbolic'
89+ ' "^="' : ' keyword.operator.assignment.compound.symbolic'
90+ ' "<<="' : ' keyword.operator.assignment.compound.symbolic'
91+ ' ">>="' : ' keyword.operator.assignment.compound.symbolic'
92+
93+ ' "=="' : ' keyword.operator.comparison.symbolic'
94+ ' "!="' : ' keyword.operator.comparison.symbolic'
95+ ' "<"' : ' keyword.operator.comparison.symbolic'
96+ ' ">"' : ' keyword.operator.comparison.symbolic'
97+ ' "<="' : ' keyword.operator.comparison.symbolic'
98+ ' ">="' : ' keyword.operator.comparison.symbolic'
99+
100+ ' "!"' : ' keyword.operator.logical.symbolic'
101+ ' "&&"' : ' keyword.operator.logical.symbolic'
102+ ' "||"' : ' keyword.operator.logical.symbolic'
103+
104+ ' "&"' : ' keyword.operator.pointer.reference.symbolic'
105+ ' "*"' : ' keyword.operator.pointer.dereference.symbolic'
106+
107+ ' "<-"' : ' keyword.operator.channel.symbolic'
108+
109+ # Storage
110+ ' "var"' : ' storage.declaration.variable'
111+ ' "const"' : ' storage.declaration.variable.immutable'
112+ ' "map"' : ' storage.declaration.map'
113+ ' "chan"' : ' storage.declaration.channel'
114+ ' "func"' : ' storage.declaration.function'
115+ ' "type"' : ' storage.declaration.datatype'
116+ ' "struct"' : ' storage.declaration.structure'
117+ ' "interface"' : ' storage.declaration.interface'
118+
119+ # Entity
120+ ' type_identifier' : [
121+ {
122+ match : ' ^(bool|byte|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$' ,
123+ scopes : ' entity.type.fundamental.support'
124+ },
125+ ' entity.type'
126+ ]
127+
128+ ' package_identifier' : ' entity.package'
129+
130+ ' label_name' : ' entity.label'
131+
132+ ' identifier' : [
133+ {
134+ exact : ' iota' ,
135+ scopes : ' entity.variable.support.iota'
136+ },
137+ ' entity.variable'
138+ ]
139+
140+ ' parameter_declaration > identifier' : [
141+ {
142+ exact : ' iota' ,
143+ scopes : ' entity.variable.support.parameter.iota'
144+ },
145+ ' entity.variable.parameter'
146+ ]
147+
148+ ' field_identifier' : ' entity.variable.member'
149+
150+ ' call_expression > identifier' : [
151+ {
152+ match : ' ^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$' ,
153+ scopes : ' entity.function.support.call'
154+ },
155+ {
156+ match : ' ^(bool|byte|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$' ,
157+ scopes : ' entity.type.fundamental.cast.support.call'
158+ },
159+ ' entity.function.call'
160+ ]
161+
162+ ' call_expression > selector_expression > field_identifier' : ' entity.function.call'
163+
164+ ' function_declaration > identifier' : ' entity.function.definition'
165+ ' method_declaration > field_identifier' : ' entity.function.method.definition'
166+ ' type_declaration > type_spec > type_identifier' : ' entity.type.definition'
167+
168+ # String
169+ ' interpreted_string_literal' : ' string.quoted'
170+ ' raw_string_literal' : ' string.quoted'
171+
172+ # Constant
173+ ' escape_sequence' : [
174+ {
175+ match : ' ^\\\\ [uUxftvnrab0-9]' ,
176+ scopes : ' constant.character.escape.code'
177+ },
178+ ' constant.character.escape'
179+ ]
180+
181+ ' rune_literal' : ' constant.character.rune'
47182
48- ' "var"' : ' keyword.import'
49- ' "type"' : ' keyword.type'
50- ' "func"' : ' keyword.function'
51- ' "const"' : ' keyword.const'
52- ' "struct"' : ' keyword.struct'
53- ' "interface"' : ' keyword.interface'
54- ' "import"' : ' keyword.import'
55- ' "package"' : ' keyword.package'
56- ' "map"' : ' keyword.map'
57- ' "chan"' : ' keyword.chan'
58-
59- ' type_identifier' : ' support.storage.type'
60- ' field_identifier' : ' variable.other.object.property'
61- ' package_identifier' : ' entity.name.package'
62-
63- ' "if"' : ' keyword.control'
64- ' "for"' : ' keyword.control'
65- ' "else"' : ' keyword.control'
66- ' "case"' : ' keyword.control'
67- ' "break"' : ' keyword.control'
68- ' "switch"' : ' keyword.control'
69- ' "select"' : ' keyword.control'
70- ' "return"' : ' keyword.control'
71- ' "default"' : ' keyword.control'
72- ' "continue"' : ' keyword.control'
73- ' "goto"' : ' keyword.control'
74- ' "fallthrough"' : ' keyword.control'
75- ' "defer"' : ' keyword.control'
76- ' "range"' : ' keyword.control'
77- ' "go"' : ' keyword.control'
78-
79- ' interpreted_string_literal' : ' string.quoted.double'
80- ' raw_string_literal' : ' string.quoted.double'
81- ' escape_sequence' : ' constant.character.escape'
82- ' rune_literal' : ' constant.other.rune'
83183 ' int_literal' : ' constant.numeric.integer'
84- ' float_literal' : ' constant.numeric.float'
85- ' imaginary_literal' : ' constant.numeric.integer'
86- ' nil' : ' constant.language.nil'
87- ' false' : ' constant.language.false'
88- ' true' : ' constant.language.true'
89-
90- ' call_expression > identifier' : ' entity.name.function'
91- ' function_declaration > identifier' : ' entity.name.function'
92- ' method_declaration > field_identifier' : ' entity.name.function'
93- ' call_expression > selector_expression > field_identifier' : ' entity.name.function'
94-
95- ' "+"' : ' keyword.operator'
96- ' "-"' : ' keyword.operator'
97- ' "*"' : ' keyword.operator'
98- ' "/"' : ' keyword.operator'
99- ' "%"' : ' keyword.operator'
100- ' "++"' : ' keyword.operator'
101- ' "--"' : ' keyword.operator'
102- ' "=="' : ' keyword.operator'
103- ' "!="' : ' keyword.operator'
104- ' ">"' : ' keyword.operator'
105- ' "<"' : ' keyword.operator'
106- ' ">="' : ' keyword.operator'
107- ' "<="' : ' keyword.operator'
108- ' "!"' : ' keyword.operator'
109- ' "|"' : ' keyword.operator'
110- ' "^"' : ' keyword.operator'
111- ' "<<"' : ' keyword.operator'
112- ' ">>"' : ' keyword.operator'
113- ' "="' : ' keyword.operator'
114- ' "+="' : ' keyword.operator'
115- ' "-="' : ' keyword.operator'
116- ' "*="' : ' keyword.operator'
117- ' "/="' : ' keyword.operator'
118- ' "%="' : ' keyword.operator'
119- ' "<<="' : ' keyword.operator'
120- ' ">>="' : ' keyword.operator'
121- ' "&="' : ' keyword.operator'
122- ' "^="' : ' keyword.operator'
123- ' "|="' : ' keyword.operator'
124- ' ":="' : ' keyword.operator'
125- ' "&"' : ' keyword.operator'
126- ' "*"' : ' keyword.operator'
127- ' "&&"' : ' keyword.operator'
128- ' "||"' : ' keyword.operator'
129- ' "..."' : ' keyword.operator'
130- ' "<-"' : ' keyword.operator'
184+ ' float_literal' : ' constant.numeric.decimal'
185+ ' imaginary_literal' : ' constant.numeric.complex'
186+
187+ ' nil' : ' constant.language.null'
188+ ' true' : ' constant.language.boolean.true'
189+ ' false' : ' constant.language.boolean.false'
190+
191+ # Comment
192+ ' comment' : ' comment.block'
193+
194+ # Punctuation
195+ ' "."' : ' punctuation.accessor.member'
196+ ' ";"' : ' punctuation.delimiter.statement'
197+ ' ":"' : ' punctuation.delimiter'
198+ ' ","' : ' punctuation.delimiter'
199+ ' "("' : ' punctuation.delimiter'
200+ ' ")"' : ' punctuation.delimiter'
201+ ' "{"' : ' punctuation.delimiter'
202+ ' "}"' : ' punctuation.delimiter'
203+ ' "["' : ' punctuation.definition'
204+ ' "]"' : ' punctuation.definition'
205+ ' "\\ ""' : ' punctuation.definition.string'
206+
207+ ' variadic_parameter_declaration > "..."' : ' punctuation.alteration.variadic'
208+ ' variadic_argument > "..."' : ' punctuation.alteration.variadic.unpack'
209+ ' implicit_length_array_type > "..."' : ' punctuation.definition.collection.array'
210+
211+ ' slice_expression > ":"' : ' punctuation.delimiter.slice'
212+ ' keyed_element > ":"' : ' punctuation.delimiter.pair'
213+
214+ ' parenthesized_expression > "("' : ' punctuation.delimiter.expression'
215+ ' parenthesized_expression > ")"' : ' punctuation.delimiter.expression'
216+
217+ ' parameter_list > "("' : ' punctuation.delimiter.parameters'
218+ ' parameter_list > ")"' : ' punctuation.delimiter.parameters'
219+
220+ ' argument_list > "("' : ' punctuation.delimiter.arguments'
221+ ' argument_list > ")"' : ' punctuation.delimiter.arguments'
222+ ' special_argument_list > "("' : ' punctuation.delimiter.arguments'
223+ ' special_argument_list > ")"' : ' punctuation.delimiter.arguments'
224+ ' type_switch_statement > "("' : ' punctuation.delimiter.arguments'
225+ ' type_switch_statement > ")"' : ' punctuation.delimiter.arguments'
226+ ' type_assertion_expression > "("' : ' punctuation.delimiter.arguments'
227+ ' type_assertion_expression > ")"' : ' punctuation.delimiter.arguments'
228+ ' type_conversion_expression > "("' : ' punctuation.delimiter.arguments'
229+ ' type_conversion_expression > ")"' : ' punctuation.delimiter.arguments'
230+
231+ ' import_spec_list > "("' : ' punctuation.delimiter.package'
232+ ' import_spec_list > ")"' : ' punctuation.delimiter.package'
233+
234+ ' const_declaration > "("' : ' punctuation.delimiter.variable'
235+ ' const_declaration > ")"' : ' punctuation.delimiter.variable'
236+ ' var_declaration > "("' : ' punctuation.delimiter.variable'
237+ ' var_declaration > ")"' : ' punctuation.delimiter.variable'
238+
239+ ' type_declaration > "("' : ' punctuation.delimiter.type'
240+ ' type_declaration > ")"' : ' punctuation.delimiter.type'
241+ ' parenthesized_type > "("' : ' punctuation.delimiter.type'
242+ ' parenthesized_type > ")"' : ' punctuation.delimiter.type'
243+
244+ ' literal_value > "{"' : ' punctuation.definition.collection'
245+ ' literal_value > "}"' : ' punctuation.definition.collection'
246+
247+ ' field_declaration_list > "{"' : ' punctuation.delimiter.body.structure'
248+ ' field_declaration_list > "}"' : ' punctuation.delimiter.body.structure'
249+
250+ ' method_spec_list > "{"' : ' punctuation.delimiter.body.class.abstract'
251+ ' method_spec_list > "}"' : ' punctuation.delimiter.body.class.abstract'
252+
253+ ' block > "{"' : ' punctuation.delimiter.statement'
254+ ' block > "}"' : ' punctuation.delimiter.statement'
255+ ' select_statement > "{"' : ' punctuation.delimiter.statement'
256+ ' select_statement > "}"' : ' punctuation.delimiter.statement'
257+ ' type_switch_statement > "{"' : ' punctuation.delimiter.statement'
258+ ' type_switch_statement > "}"' : ' punctuation.delimiter.statement'
259+ ' expression_switch_statement > "{"' : ' punctuation.delimiter.statement'
260+ ' expression_switch_statement > "}"' : ' punctuation.delimiter.statement'
261+
262+ ' func_literal > block > "{"' : ' punctuation.delimiter.body.function'
263+ ' func_literal > block > "}"' : ' punctuation.delimiter.body.function'
264+ ' function_declaration > block > "{"' : ' punctuation.delimiter.body.function'
265+ ' function_declaration > block > "}"' : ' punctuation.delimiter.body.function'
266+ ' method_declaration > block > "{"' : ' punctuation.delimiter.body.function.method'
267+ ' method_declaration > block > "}"' : ' punctuation.delimiter.body.function.method'
268+
269+ ' map_type > "["' : ' punctuation.definition.collection.map'
270+ ' map_type > "]"' : ' punctuation.definition.collection.map'
271+ ' slice_type > "["' : ' punctuation.definition.collection.slice'
272+ ' slice_type > "]"' : ' punctuation.definition.collection.slice'
273+ ' array_type > "["' : ' punctuation.definition.collection.array'
274+ ' array_type > "]"' : ' punctuation.definition.collection.array'
275+ ' implicit_length_array_type > "["' : ' punctuation.definition.collection.array'
276+ ' implicit_length_array_type > "]"' : ' punctuation.definition.collection.array'
277+
278+ ' index_expression > "["' : ' punctuation.accessor.subscript.index'
279+ ' index_expression > "]"' : ' punctuation.accessor.subscript.index'
280+ ' slice_expression > "["' : ' punctuation.accessor.subscript.slice'
281+ ' slice_expression > "]"' : ' punctuation.accessor.subscript.slice'
282+
283+ ' ERROR > "."' : ' punctuation.accessor.member.invalid.illegal'
284+ ' ERROR > ";"' : ' punctuation.delimiter.statement.invalid.illegal'
285+ ' ERROR > ":"' : ' punctuation.delimiter.invalid.illegal'
286+ ' ERROR > ","' : ' punctuation.delimiter.invalid.illegal'
287+ ' ERROR > "("' : ' punctuation.delimiter.invalid.illegal'
288+ ' ERROR > ")"' : ' punctuation.delimiter.invalid.illegal'
289+ ' ERROR > "{"' : ' punctuation.delimiter.invalid.illegal'
290+ ' ERROR > "}"' : ' punctuation.delimiter.invalid.illegal'
291+ ' ERROR > "["' : ' punctuation.definition.invalid.illegal'
292+ ' ERROR > "]"' : ' punctuation.definition.invalid.illegal'
293+ ' ERROR > "..."' : ' punctuation.alteration.invalid.illegal'
294+ ' ERROR > "\\ ""' : ' punctuation.definition.string.invalid.illegal'
0 commit comments