File tree Expand file tree Collapse file tree 2 files changed +55
-22
lines changed Expand file tree Collapse file tree 2 files changed +55
-22
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ args = { mode = "local", processId = "{0}" }
324
324
325
325
[[grammar ]]
326
326
name = " go"
327
- source = { git = " https://github.com/tree-sitter/tree-sitter-go" , rev = " 05900faa3cdb5d2d8c8bd5e77ee698487e0a8611 " }
327
+ source = { git = " https://github.com/tree-sitter/tree-sitter-go" , rev = " 64457ea6b73ef5422ed1687178d4545c3e91334a " }
328
328
329
329
[[language ]]
330
330
name = " gomod"
Original file line number Diff line number Diff line change 19
19
(method_declaration
20
20
name: (field_identifier) @function.method )
21
21
22
+ (method_spec
23
+ name: (field_identifier) @function.method )
24
+
22
25
; Identifiers
23
26
24
27
((identifier) @constant (match? @constant "^[A-Z][A-Z\\d_]+$"))
32
35
(match? @type.builtin "^(any|bool|byte|comparable|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$"))
33
36
34
37
(type_identifier) @type
38
+ (type_spec
39
+ name: (type_identifier) @constructor )
35
40
(field_identifier) @variable.other.member
36
41
(identifier) @variable
37
- (package_identifier) @variable
42
+ (package_identifier) @namespace
43
+
44
+ (parameter_declaration (identifier) @variable.parameter )
45
+ (variadic_parameter_declaration (identifier) @variable.parameter )
38
46
47
+ (label_name) @label
48
+
49
+ (const_spec
50
+ name: (identifier) @constant )
39
51
40
52
; Operators
41
53
82
94
; Keywords
83
95
84
96
[
85
- "break"
86
- "case"
87
- "chan"
88
- "const"
89
- "continue"
90
97
"default"
91
- "defer"
98
+ "type"
99
+ ] @keyword
100
+
101
+ [
102
+ "if"
92
103
"else"
93
- "fallthrough"
104
+ "switch"
105
+ "select"
106
+ "case"
107
+ ] @keyword.control.conditional
108
+
109
+ [
94
110
"for"
95
- "func"
96
- "go"
97
- "goto"
98
- "if"
99
- "interface"
100
- "map"
101
111
"range"
102
- "return"
103
- "select"
104
- "struct"
105
- "switch"
106
- "type"
107
- "var"
108
- ] @keyword
112
+ ] @keyword.control.repeat
109
113
110
114
[
111
115
"import"
112
116
"package"
113
117
] @keyword.control.import
114
118
119
+ [
120
+ "return"
121
+ "continue"
122
+ "break"
123
+ "fallthrough"
124
+ ] @keyword.control.return
125
+
126
+ [
127
+ "func"
128
+ ] @keyword.function
129
+
130
+ [
131
+ "var"
132
+ "chan"
133
+ "interface"
134
+ "map"
135
+ "struct"
136
+ ] @keyword.storage.type
137
+
138
+ [
139
+ "const"
140
+ ] @keyword.storage.modifier
141
+
142
+ [
143
+ "defer"
144
+ "goto"
145
+ "go"
146
+ ] @function.macro
147
+
115
148
; Delimiters
116
149
117
150
[
You can’t perform that action at this time.
0 commit comments