tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter
MIT License
340 stars 97 forks source link

Differentiate `//` from `///` #175

Closed WhyNotHugo closed 6 months ago

WhyNotHugo commented 1 year ago

Currently lines starting with // and /// both map to line_comment.

This makes it impossible to highlight both of them with different style. Specifically, lines starting with /// (and //!) are rustdoc, and get different treatment (they end up in generated documentation).

In particular, I'd like to highlight them both with different style since it's current very easy to confuse the two, especially when they're in consecutive lines.

amaanq commented 1 year ago

Use match predicates to check the beginning

Chris00 commented 9 months ago

This will be done in Emacs.

clason commented 6 months ago

Closed by #195