queries: highlight local closures

pull/13932/head
Nik Revenco 2025-07-12 14:35:13 +01:00
parent 36c4fa6ab4
commit 6ddadd3fa7
1 changed files with 15 additions and 0 deletions

View File

@ -21,3 +21,18 @@
; References
(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))