elixir-lang / tree-sitter-elixir

Elixir grammar for tree-sitter
https://elixir-lang.org/tree-sitter-elixir
Apache License 2.0
249 stars 25 forks source link

Missing highlighting for function with no arguments #51

Closed jwbaldwin closed 1 year ago

jwbaldwin commented 1 year ago

This seems to have been a recent change - but I can't see how any of the recent changes to this grammar would have affected this.

A function call without parenthesis (zero-arity) is no longer highlighted as an Identifier:

Screen Shot 2023-03-24 at 12 28 15 PM

Have tried updating plugins, updating neovim, using different colorschemes etc.

the-mikedavis commented 1 year ago

Could you open this against nvim-treesitter instead? The parser hasn't changed the way functions or identifiers are treated in quite a while. I also see this case highlighting correctly using tree-sitter highlight in this repo.

For reference, this is the pattern in the syntax highlighting query which highlights the case for tree-sitter highlight: https://github.com/elixir-lang/tree-sitter-elixir/blob/869dff3ceb8823ca4b17ca33b663667c8e41e8ba/queries/highlights.scm#L132-L142

nvim-treesitter uses slightly different queries than the highlights.scm you find in parser repos (tree-sitter-elixir, tree-sitter-rust, etc.)

jwbaldwin commented 1 year ago

Will do! Thanks. I didn't realize tree-sitter's queries could differ from the parsers. That makes sense. 😄