tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter
MIT License
350 stars 98 forks source link

Inconsistent syntax highlighting for function arguments #179

Closed flobsh closed 1 year ago

flobsh commented 1 year ago

Hi,

There is an inconsistency in function arguments syntax highlighting. In the code below, I would expect f in the write! macro to have the same formatting as the f in the function arguments. I am using Helix 23.05 but this seemed to be a tree-sitter-related issue.

image

amaanq commented 1 year ago

Not a tree-sitter issue, you're looking for semantic tokens support

flobsh commented 1 year ago

Oh okay, so that's rather an editor issue (Helix in this case)?

amaanq commented 1 year ago

well, in a sense yes, but really i'd think it's the lsp (rust analyzer), I'm assuming helix properly highlights parameter semantic tokens