mirror of https://github.com/helix-editor/helix
queries: highlight local closures
parent
36c4fa6ab4
commit
6ddadd3fa7
|
@ -21,3 +21,18 @@
|
||||||
|
|
||||||
; 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