gleam-lang / tree-sitter-gleam

🌳 A tree-sitter grammar for the Gleam programming language
Apache License 2.0
71 stars 13 forks source link

make locals.scm queries more granular #8

Closed the-mikedavis closed 2 years ago

the-mikedavis commented 2 years ago

I ran into some cases where locals.scm would override the highlight for things like record keys and it made me think that

(identifier) @local.reference

covered too many cases. So this PR makes the reference queries more granular. In general, now the queries try to cover cases where (identifier) is being used as an existing binding rather than a pattern or any other syntax element.

I think this covers all the cases now but I'm not too sure :thinking: