Skip to content

Commit 71821c6

Browse files
committed
fix(highlights): correct incorrect queries involving supertypes
This corrects queries involving the `decl` supertype, explicitly listing the three separate child node types with the associated `name`/`names` captures.
1 parent 2e51745 commit 71821c6

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

queries/highlights.scm

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,21 @@
121121

122122
; ----------------------------------------------------------------------------
123123
; Functions and variables
124-
(decl
124+
(decl/signature
125+
[
126+
name: (variable) @function
127+
names: (binding_list
128+
(variable) @function)
129+
])
130+
131+
(decl/function
132+
[
133+
name: (variable) @function
134+
names: (binding_list
135+
(variable) @function)
136+
])
137+
138+
(decl/bind
125139
[
126140
name: (variable) @function
127141
names: (binding_list
@@ -142,7 +156,14 @@
142156
type: (type))
143157
.
144158
(decl
145-
name: (variable) @variable)
159+
[
160+
(signature
161+
name: (variable) @variable)
162+
(function
163+
name: (variable) @variable)
164+
(bind
165+
name: (variable) @variable)
166+
])
146167
match: (_)
147168
(#eq? @_name @variable))
148169

@@ -160,7 +181,14 @@
160181
(#eq? @_type "IO"))
161182
.
162183
(decl
163-
name: (variable) @function)
184+
[
185+
(signature
186+
name: (variable) @function)
187+
(function
188+
name: (variable) @function)
189+
(bind
190+
name: (variable) @function)
191+
])
164192
match: (_)
165193
(#eq? @_name @function))
166194

0 commit comments

Comments
 (0)