crates/languages/src/rust/highlights.scm 🔗
@@ -133,6 +133,11 @@
(block_comment)
] @comment
+[
+ (line_comment (doc_comment))
+ (block_comment (doc_comment))
+] @comment.doc
+
[
"!"
"!="
earomc created
## Release Notes:
- Added ability to style doc comments in Rust separately with
`comment.doc`
([#15322](https://github.com/zed-industries/zed/issues/15322)).
Just required adding another query to the highlights.scm file. Took
inspiration from the tree-sitter-rust repository
[here](https://github.com/tree-sitter/tree-sitter-rust/blob/master/queries/highlights.scm)
#### Doc comments customized in the theme are working now:

#### Snippet from the .json theme file

crates/languages/src/rust/highlights.scm | 5 +++++
1 file changed, 5 insertions(+)
@@ -133,6 +133,11 @@
(block_comment)
] @comment
+[
+ (line_comment (doc_comment))
+ (block_comment (doc_comment))
+] @comment.doc
+
[
"!"
"!="