@@ -43,88 +43,251 @@ folds: [
43
43
scopes :
44
44
' source_file' : ' source.go'
45
45
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
+ ' "var"' : ' keyword.storage.declaration'
110
+ ' "const"' : ' keyword.storage.declaration'
111
+ ' "map"' : ' keyword.storage.declaration'
112
+ ' "chan"' : ' keyword.storage.declaration'
113
+ ' "func"' : ' keyword.storage.declaration'
114
+ ' "type"' : ' keyword.storage.declaration'
115
+ ' "struct"' : ' keyword.storage.declaration'
116
+ ' "interface"' : ' keyword.storage.declaration'
117
+
118
+ # Entity
119
+ ' type_identifier' : [
120
+ {
121
+ match : ' ^(bool|byte|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$' ,
122
+ scopes : ' entity.type.fundamental.support'
123
+ },
124
+ ' entity.type'
125
+ ]
126
+
127
+ ' package_identifier' : ' entity.package'
128
+
129
+ ' label_name' : ' entity.label'
130
+
131
+ ' identifier' : [
132
+ {
133
+ exact : ' iota' ,
134
+ scopes : ' entity.variable.support.iota'
135
+ },
136
+ ' entity.variable'
137
+ ]
138
+
139
+ ' parameter_declaration > identifier' : [
140
+ {
141
+ exact : ' iota' ,
142
+ scopes : ' entity.variable.support.parameter.iota'
143
+ },
144
+ ' entity.variable.parameter'
145
+ ]
146
+
147
+ ' field_identifier' : ' entity.variable.member'
148
+
149
+ ' call_expression > identifier' : [
150
+ {
151
+ match : ' ^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$' ,
152
+ scopes : ' entity.function.support.call'
153
+ },
154
+ {
155
+ match : ' ^(bool|byte|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$' ,
156
+ scopes : ' entity.type.fundamental.cast.support.call'
157
+ },
158
+ ' entity.function.call'
159
+ ]
160
+
161
+ ' call_expression > selector_expression > field_identifier' : ' entity.function.call'
162
+
163
+ ' function_declaration > identifier' : ' entity.function.definition'
164
+ ' method_declaration > field_identifier' : ' entity.function.method.definition'
165
+ ' type_declaration > type_spec > type_identifier' : ' entity.type.definition'
166
+
167
+ # String
168
+ ' interpreted_string_literal' : ' string.quoted'
169
+ ' raw_string_literal' : ' string.quoted'
170
+
171
+ # Constant
172
+ ' escape_sequence' : [
173
+ {
174
+ match : ' ^\\\\ [uUxftvnrab0-9]' ,
175
+ scopes : ' constant.character.escape.code'
176
+ },
177
+ ' constant.character.escape'
178
+ ]
179
+
180
+ ' rune_literal' : ' constant.character.rune'
47
181
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'
83
182
' 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'
183
+ ' float_literal' : ' constant.numeric.decimal'
184
+ ' imaginary_literal' : ' constant.numeric.complex'
185
+
186
+ ' nil' : ' constant.language.null'
187
+ ' true' : ' constant.language.boolean.true'
188
+ ' false' : ' constant.language.boolean.false'
189
+
190
+ # Comment
191
+ ' comment' : ' comment.block'
192
+
193
+ # Punctuation
194
+ ' "."' : ' punctuation.accessor.member'
195
+ ' ";"' : ' punctuation.delimiter.statement'
196
+ ' ":"' : ' punctuation.delimiter'
197
+ ' ","' : ' punctuation.delimiter'
198
+ ' "("' : ' punctuation.delimiter'
199
+ ' ")"' : ' punctuation.delimiter'
200
+ ' "{"' : ' punctuation.delimiter'
201
+ ' "}"' : ' punctuation.delimiter'
202
+ ' "["' : ' punctuation.definition'
203
+ ' "]"' : ' punctuation.definition'
204
+ ' "\\ ""' : ' punctuation.definition.string'
205
+
206
+ ' variadic_parameter_declaration > "..."' : ' punctuation.alteration.variadic'
207
+ ' variadic_argument > "..."' : ' punctuation.alteration.variadic.unpack'
208
+ ' implicit_length_array_type > "..."' : ' punctuation.definition.collection.array'
209
+
210
+ ' slice_expression > ":"' : ' punctuation.delimiter.slice'
211
+ ' keyed_element > ":"' : ' punctuation.delimiter.pair'
212
+
213
+ ' parenthesized_expression > "("' : ' punctuation.delimiter.expression'
214
+ ' parenthesized_expression > ")"' : ' punctuation.delimiter.expression'
215
+
216
+ ' parameter_list > "("' : ' punctuation.delimiter.parameters'
217
+ ' parameter_list > ")"' : ' punctuation.delimiter.parameters'
218
+
219
+ ' argument_list > "("' : ' punctuation.delimiter.arguments'
220
+ ' argument_list > ")"' : ' punctuation.delimiter.arguments'
221
+ ' special_argument_list > "("' : ' punctuation.delimiter.arguments'
222
+ ' special_argument_list > ")"' : ' punctuation.delimiter.arguments'
223
+ ' type_switch_statement > "("' : ' punctuation.delimiter.arguments'
224
+ ' type_switch_statement > ")"' : ' punctuation.delimiter.arguments'
225
+ ' type_assertion_expression > "("' : ' punctuation.delimiter.arguments'
226
+ ' type_assertion_expression > ")"' : ' punctuation.delimiter.arguments'
227
+ ' type_conversion_expression > "("' : ' punctuation.delimiter.arguments'
228
+ ' type_conversion_expression > ")"' : ' punctuation.delimiter.arguments'
229
+
230
+ ' import_spec_list > "("' : ' punctuation.delimiter.package'
231
+ ' import_spec_list > ")"' : ' punctuation.delimiter.package'
232
+
233
+ ' const_declaration > "("' : ' punctuation.delimiter.variable'
234
+ ' const_declaration > ")"' : ' punctuation.delimiter.variable'
235
+ ' var_declaration > "("' : ' punctuation.delimiter.variable'
236
+ ' var_declaration > ")"' : ' punctuation.delimiter.variable'
237
+
238
+ ' type_declaration > "("' : ' punctuation.delimiter.type'
239
+ ' type_declaration > ")"' : ' punctuation.delimiter.type'
240
+ ' parenthesized_type > "("' : ' punctuation.delimiter.type'
241
+ ' parenthesized_type > ")"' : ' punctuation.delimiter.type'
242
+
243
+ ' literal_value > "{"' : ' punctuation.definition.collection'
244
+ ' literal_value > "}"' : ' punctuation.definition.collection'
245
+
246
+ ' field_declaration_list > "{"' : ' punctuation.delimiter.body.structure'
247
+ ' field_declaration_list > "}"' : ' punctuation.delimiter.body.structure'
248
+
249
+ ' method_spec_list > "{"' : ' punctuation.delimiter.body.class.abstract'
250
+ ' method_spec_list > "}"' : ' punctuation.delimiter.body.class.abstract'
251
+
252
+ ' block > "{"' : ' punctuation.delimiter.statement'
253
+ ' block > "}"' : ' punctuation.delimiter.statement'
254
+ ' select_statement > "{"' : ' punctuation.delimiter.statement'
255
+ ' select_statement > "}"' : ' punctuation.delimiter.statement'
256
+ ' type_switch_statement > "{"' : ' punctuation.delimiter.statement'
257
+ ' type_switch_statement > "}"' : ' punctuation.delimiter.statement'
258
+ ' expression_switch_statement > "{"' : ' punctuation.delimiter.statement'
259
+ ' expression_switch_statement > "}"' : ' punctuation.delimiter.statement'
260
+
261
+ ' func_literal > block > "{"' : ' punctuation.delimiter.body.function'
262
+ ' func_literal > block > "}"' : ' punctuation.delimiter.body.function'
263
+ ' function_declaration > block > "{"' : ' punctuation.delimiter.body.function'
264
+ ' function_declaration > block > "}"' : ' punctuation.delimiter.body.function'
265
+ ' method_declaration > block > "{"' : ' punctuation.delimiter.body.function.method'
266
+ ' method_declaration > block > "}"' : ' punctuation.delimiter.body.function.method'
267
+
268
+ ' map_type > "["' : ' punctuation.definition.collection.map'
269
+ ' map_type > "]"' : ' punctuation.definition.collection.map'
270
+ ' slice_type > "["' : ' punctuation.definition.collection.slice'
271
+ ' slice_type > "]"' : ' punctuation.definition.collection.slice'
272
+ ' array_type > "["' : ' punctuation.definition.collection.array'
273
+ ' array_type > "]"' : ' punctuation.definition.collection.array'
274
+ ' implicit_length_array_type > "["' : ' punctuation.definition.collection.array'
275
+ ' implicit_length_array_type > "]"' : ' punctuation.definition.collection.array'
276
+
277
+ ' index_expression > "["' : ' punctuation.accessor.subscript.index'
278
+ ' index_expression > "]"' : ' punctuation.accessor.subscript.index'
279
+ ' slice_expression > "["' : ' punctuation.accessor.subscript.slice'
280
+ ' slice_expression > "]"' : ' punctuation.accessor.subscript.slice'
281
+
282
+ ' ERROR > "."' : ' punctuation.accessor.member.invalid.illegal'
283
+ ' ERROR > ";"' : ' punctuation.delimiter.statement.invalid.illegal'
284
+ ' ERROR > ":"' : ' punctuation.delimiter.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.definition.invalid.illegal'
291
+ ' ERROR > "]"' : ' punctuation.definition.invalid.illegal'
292
+ ' ERROR > "..."' : ' punctuation.alteration.invalid.illegal'
293
+ ' ERROR > "\\ ""' : ' punctuation.definition.string.invalid.illegal'
0 commit comments