fix: Stop Rust highlighting path as local

See attached issue. I don't love the solution, but am not sure how else
to attack the problem. We want to match *almost* every `identifier` in
the scope. We don't want to match scoped identifiers, so the best I
could come up with (without restating large chunks of `highlights.scm`)
was to repeat the negative case. I think this could be another use case
for `#has-ancestor?`, (or `#not-has-ancestor?` technically), but unless
that gets added, I think this is the most straightforward solution.

Closes: #13194
pull/13889/head
Caleb Larsen 2025-07-03 22:02:22 -05:00
parent bcb6c20a84
commit 8d660449c0
1 changed files with 3 additions and 0 deletions

View File

@ -23,3 +23,6 @@
; References
(identifier) @local.reference
(scoped_identifier
path: (identifier)? @namespace
name: (identifier) @namespace)