tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter
MIT License
338 stars 96 forks source link

Attribute doesn't parse correctly #193

Closed cloudhead closed 11 months ago

cloudhead commented 11 months ago

The "attribute" highlight group only parses the #[ and not the rest, eg. here it is highlighted in blue:

image
amaanq commented 11 months ago

not a parse error, whatever highlights you have in the tool you use must be configured with the queries it uses

cloudhead commented 11 months ago

Ok, I'm using this library; is there a complete list of highlight groups somewhere? I find it strange that the attribute group only highlights the first two characters.. is it because the code inside is a different language?

amaanq commented 11 months ago

Are you using the cli with tree-sitter highlight? If not, then whatever tool it is has the issue

cloudhead commented 10 months ago

I've figured it out, thanks and sorry for the noise. The problem was not understanding that tree-sitter will "nest" syntax groups.