queries: do not highlight `bar` in `bar = || ()` as closure

pull/13932/head
Nik Revenco 2025-07-12 15:38:50 +01:00
parent db15411f63
commit df1ea8cba3
2 changed files with 0 additions and 22 deletions

View File

@ -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:
; ;

View File

@ -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))