tree-sitter-rust icon indicating copy to clipboard operation
tree-sitter-rust copied to clipboard

Separate regular comments from Doc Strings

Open nickeb96 opened this issue 2 years ago • 3 comments

It would be great if documentation comments made with ///, //!, etc. were matched to different nodes than normal comments. I'd like to be able treat them separately when doing syntax highlighting.

nickeb96 avatar Jun 23 '22 23:06 nickeb96

Bump

Is this project still being maintained?

nickeb96 avatar Jul 09 '22 18:07 nickeb96

it's maintained, but there's not much activity.

aryx avatar Jul 18 '22 08:07 aryx

We accept PRs to fix issues though :)

aryx avatar Aug 18 '22 11:08 aryx

In a similar vein, I'd like to be able to syntax highlight examples in doc strings. This is a feature of other highlighters. Is such a thing possible with tree-sitter?

maxcountryman avatar Nov 05 '22 16:11 maxcountryman

See #128 which merges successive doc comments, which it seems would be a precondition to adding rust embeds for fenced code blocks in documentation.

cormacrelf avatar Dec 04 '22 03:12 cormacrelf

This distinction will be done in Emacs. See also the duplicate issue https://github.com/tree-sitter/tree-sitter-rust/issues/175.

Chris00 avatar Nov 30 '23 17:11 Chris00