mirror of https://github.com/helix-editor/helix
queries: do not highlight `bar` in `bar = || ()` as closure
parent
db15411f63
commit
df1ea8cba3
|
@ -305,13 +305,6 @@
|
||||||
; Functions
|
; Functions
|
||||||
; -------
|
; -------
|
||||||
|
|
||||||
; In here, `bar` is a function, as it is equal to a closure:
|
|
||||||
;
|
|
||||||
; let bar = || 4;
|
|
||||||
(let_declaration
|
|
||||||
pattern: (identifier) @function
|
|
||||||
value: (closure_expression))
|
|
||||||
|
|
||||||
; highlight `baz` in `any_function(foo::bar::baz)` as function
|
; highlight `baz` in `any_function(foo::bar::baz)` as function
|
||||||
; This generically works for an unlimited number of path segments:
|
; This generically works for an unlimited number of path segments:
|
||||||
;
|
;
|
||||||
|
|
|
@ -41,18 +41,3 @@
|
||||||
|
|
||||||
; References
|
; References
|
||||||
(identifier) @local.reference
|
(identifier) @local.reference
|
||||||
|
|
||||||
; In here, `bar` is a function, as it is equal to a closure:
|
|
||||||
;
|
|
||||||
; let bar = || 4;
|
|
||||||
;
|
|
||||||
; After this, we know that `bar` must be a function:
|
|
||||||
;
|
|
||||||
; let a = bar;
|
|
||||||
; ^^^ function
|
|
||||||
;
|
|
||||||
; let a = f(bar)
|
|
||||||
; ^^^ function
|
|
||||||
(let_declaration
|
|
||||||
pattern: (identifier) @local.definition.function
|
|
||||||
value: (closure_expression))
|
|
||||||
|
|
Loading…
Reference in New Issue