@@ -43,88 +43,256 @@ 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.symbol' 
66+   ' "-"' :  ' keyword.operator.arithmetic.symbol' 
67+   ' binary_expression > "*"' :  ' keyword.operator.arithmetic.symbol' 
68+   ' "/"' :  ' keyword.operator.arithmetic.symbol' 
69+   ' "%"' :  ' keyword.operator.arithmetic.symbol' 
70+   ' "++"' :  ' keyword.operator.arithmetic.symbol' 
71+   ' "--"' :  ' keyword.operator.arithmetic.symbol' 
72+ 
73+   ' binary_expression > "&"' :  ' keyword.operator.bitwise.symbol' 
74+   ' "|"' :  ' keyword.operator.bitwise.symbol' 
75+   ' "^"' :  ' keyword.operator.bitwise.symbol' 
76+   ' "&^"' :  ' keyword.operator.bitwise.symbol' 
77+   ' "<<"' :  ' keyword.operator.bitwise.shift.symbol' 
78+   ' ">>"' :  ' keyword.operator.bitwise.shift.symbol' 
79+ 
80+   ' "="' :  ' keyword.operator.assignment.symbol' 
81+   ' ":="' :  ' keyword.operator.assignment.symbol' 
82+   ' "+="' :  ' keyword.operator.assignment.compound.symbol' 
83+   ' "-="' :  ' keyword.operator.assignment.compound.symbol' 
84+   ' "*="' :  ' keyword.operator.assignment.compound.symbol' 
85+   ' "/="' :  ' keyword.operator.assignment.compound.symbol' 
86+   ' "%="' :  ' keyword.operator.assignment.compound.symbol' 
87+   ' "<<="' :  ' keyword.operator.assignment.compound.symbol' 
88+   ' ">>="' :  ' keyword.operator.assignment.compound.symbol' 
89+   ' "&="' :  ' keyword.operator.assignment.compound.symbol' 
90+   ' "|="' :  ' keyword.operator.assignment.compound.symbol' 
91+   ' "^="' :  ' keyword.operator.assignment.compound.symbol' 
92+ 
93+   ' "=="' :  ' keyword.operator.comparison.symbol' 
94+   ' "!="' :  ' keyword.operator.comparison.symbol' 
95+   ' "<"' :  ' keyword.operator.comparison.symbol' 
96+   ' ">"' :  ' keyword.operator.comparison.symbol' 
97+   ' "<="' :  ' keyword.operator.comparison.symbol' 
98+   ' ">="' :  ' keyword.operator.comparison.symbol' 
99+ 
100+   ' "!"' :  ' keyword.operator.logical.symbol' 
101+   ' "&&"' :  ' keyword.operator.logical.symbol' 
102+   ' "||"' :  ' keyword.operator.logical.symbol' 
103+ 
104+   ' "&"' :  ' keyword.operator.pointer.reference.symbol' 
105+   ' "*"' :  ' keyword.operator.pointer.dereference.symbol' 
106+ 
107+   ' "<-"' :  ' keyword.operator.channel.symbol' 
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 :  ' [tf]'  ,
176+       scopes :  ' constant.character.escape.whitespace' 
177+     },
178+     {
179+       match :  ' [nr]'  ,
180+       scopes :  ' constant.character.escape.whitespace.newline' 
181+     },
182+     ' constant.character.escape' 
183+   ]
184+ 
185+   ' rune_literal' :  ' constant.character.rune' 
47186
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' 
83187  ' 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' 
188+   ' float_literal' :  ' constant.numeric.decimal' 
189+   ' imaginary_literal' :  ' constant.numeric.complex' 
190+ 
191+   ' nil' :  ' constant.language.null' 
192+   ' true' :  ' constant.language.boolean.true' 
193+   ' false' :  ' constant.language.boolean.false' 
194+ 
195+   #  Comment
196+   ' comment' :  ' comment.block' 
197+ 
198+   #  Punctuation
199+   ' ":"' :  ' punctuation.definition' 
200+   ' "("' :  ' punctuation.definition' 
201+   ' ")"' :  ' punctuation.definition' 
202+   ' "{"' :  ' punctuation.definition' 
203+   ' "}"' :  ' punctuation.definition' 
204+   ' "["' :  ' punctuation.definition' 
205+   ' "]"' :  ' punctuation.definition' 
206+   ' ","' :  ' punctuation.separator' 
207+   ' ";"' :  ' punctuation.terminator' 
208+   ' "."' :  ' punctuation.accessor.member' 
209+   ' "\\ ""' :  ' punctuation.definition.string' 
210+ 
211+   ' variadic_parameter_declaration > "..."' :  ' punctuation.definition.variadic' 
212+   ' variadic_argument > "..."' :  ' punctuation.definition.variadic.unpack' 
213+   ' implicit_length_array_type > "..."' :  ' punctuation.definition.collection.array' 
214+ 
215+   ' slice_expression > ":"' :  ' punctuation.separator.slice' 
216+   ' keyed_element > ":"' :  ' punctuation.separator.pair' 
217+ 
218+   ' parenthesized_expression > "("' :  ' punctuation.definition.expression' 
219+   ' parenthesized_expression > ")"' :  ' punctuation.definition.expression' 
220+ 
221+   ' parameter_list > "("' :  ' punctuation.definition.parameters' 
222+   ' parameter_list > ")"' :  ' punctuation.definition.parameters' 
223+ 
224+   ' argument_list > "("' :  ' punctuation.definition.arguments' 
225+   ' argument_list > ")"' :  ' punctuation.definition.arguments' 
226+   ' special_argument_list > "("' :  ' punctuation.definition.arguments' 
227+   ' special_argument_list > ")"' :  ' punctuation.definition.arguments' 
228+   ' type_switch_statement > "("' :  ' punctuation.definition.arguments' 
229+   ' type_switch_statement > ")"' :  ' punctuation.definition.arguments' 
230+   ' type_assertion_expression > "("' :  ' punctuation.definition.arguments' 
231+   ' type_assertion_expression > ")"' :  ' punctuation.definition.arguments' 
232+   ' type_conversion_expression > "("' :  ' punctuation.definition.arguments' 
233+   ' type_conversion_expression > ")"' :  ' punctuation.definition.arguments' 
234+ 
235+   ' import_spec_list > "("' :  ' punctuation.definition.package' 
236+   ' import_spec_list > ")"' :  ' punctuation.definition.package' 
237+ 
238+   ' const_declaration > "("' :  ' punctuation.definition.variable' 
239+   ' const_declaration > ")"' :  ' punctuation.definition.variable' 
240+   ' var_declaration > "("' :  ' punctuation.definition.variable' 
241+   ' var_declaration > ")"' :  ' punctuation.definition.variable' 
242+ 
243+   ' type_declaration > "("' :  ' punctuation.definition.type' 
244+   ' type_declaration > ")"' :  ' punctuation.definition.type' 
245+   ' parenthesized_type > "("' :  ' punctuation.definition.type' 
246+   ' parenthesized_type > ")"' :  ' punctuation.definition.type' 
247+ 
248+   ' literal_value > "{"' :  ' punctuation.definition.literal' 
249+   ' literal_value > "}"' :  ' punctuation.definition.literal' 
250+ 
251+   ' field_declaration_list > "{"' :  ' punctuation.definition.body.structure' 
252+   ' field_declaration_list > "}"' :  ' punctuation.definition.body.structure' 
253+ 
254+   ' method_spec_list > "{"' :  ' punctuation.definition.body.class.abstract' 
255+   ' method_spec_list > "}"' :  ' punctuation.definition.body.class.abstract' 
256+ 
257+   ' block > "{"' :  ' punctuation.definition.statement' 
258+   ' block > "}"' :  ' punctuation.definition.statement' 
259+   ' select_statement > "{"' :  ' punctuation.definition.statement' 
260+   ' select_statement > "}"' :  ' punctuation.definition.statement' 
261+   ' type_switch_statement > "{"' :  ' punctuation.definition.statement' 
262+   ' type_switch_statement > "}"' :  ' punctuation.definition.statement' 
263+   ' expression_switch_statement > "{"' :  ' punctuation.definition.statement' 
264+   ' expression_switch_statement > "}"' :  ' punctuation.definition.statement' 
265+ 
266+   ' func_literal > block > "{"' :  ' punctuation.definition.body.function' 
267+   ' func_literal > block > "}"' :  ' punctuation.definition.body.function' 
268+   ' function_declaration > block > "{"' :  ' punctuation.definition.body.function' 
269+   ' function_declaration > block > "}"' :  ' punctuation.definition.body.function' 
270+   ' method_declaration > block > "{"' :  ' punctuation.definition.body.function.method' 
271+   ' method_declaration > block > "}"' :  ' punctuation.definition.body.function.method' 
272+ 
273+   ' map_type > "["' :  ' punctuation.definition.collection.map' 
274+   ' map_type > "]"' :  ' punctuation.definition.collection.map' 
275+   ' slice_type > "["' :  ' punctuation.definition.collection.slice' 
276+   ' slice_type > "]"' :  ' punctuation.definition.collection.slice' 
277+   ' array_type > "["' :  ' punctuation.definition.collection.array' 
278+   ' array_type > "]"' :  ' punctuation.definition.collection.array' 
279+   ' implicit_length_array_type > "["' :  ' punctuation.definition.collection.array' 
280+   ' implicit_length_array_type > "]"' :  ' punctuation.definition.collection.array' 
281+ 
282+   ' index_expression > "["' :  ' punctuation.accessor.subscript.index' 
283+   ' index_expression > "]"' :  ' punctuation.accessor.subscript.index' 
284+   ' slice_expression > "["' :  ' punctuation.accessor.subscript.slice' 
285+   ' slice_expression > "]"' :  ' punctuation.accessor.subscript.slice' 
286+ 
287+   ' ERROR > ":"' :  ' punctuation.definition.invalid.illegal' 
288+   ' ERROR > "{"' :  ' punctuation.definition.invalid.illegal' 
289+   ' ERROR > "}"' :  ' punctuation.definition.invalid.illegal' 
290+   ' ERROR > "("' :  ' punctuation.definition.invalid.illegal' 
291+   ' ERROR > ")"' :  ' punctuation.definition.invalid.illegal' 
292+   ' ERROR > "["' :  ' punctuation.definition.invalid.illegal' 
293+   ' ERROR > "]"' :  ' punctuation.definition.invalid.illegal' 
294+   ' ERROR > ","' :  ' punctuation.separator.invalid.illegal' 
295+   ' ERROR > ";"' :  ' punctuation.terminator.invalid.illegal' 
296+   ' ERROR > "."' :  ' punctuation.accessor.member.invalid.illegal' 
297+   ' ERROR > "\\ ""' :  ' punctuation.definition.string.invalid.illegal' 
298+   ' ERROR > "..."' :  ' punctuation.definition.invalid.illegal' 
0 commit comments