Distinction between line comments and block/doc comments #1867
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
A good example for something similar is #1618. The theming you have looks good but the highlight queries for languages with block comments need to be captured in a way that can be themed like that. For example, this rust query line could be changed into ((line_comment) @comment.documentation
(#match? @comment.documentation "^///"))
(line_comment) @comment.line
(block_comment) @comment.block Themes that have a |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer! I'll try and modify the relevant |
Beta Was this translation helpful? Give feedback.
A good example for something similar is #1618. The theming you have looks good but the highlight queries for languages with block comments need to be captured in a way that can be themed like that. For example, this rust query line could be changed into
((line_comment) @comment.documentation (#match? @comment.documentation "^///")) (line_comment) @comment.line (block_comment) @comment.block
Themes that have a
comment.block
would style the block comments differently and themes without would fall back to whatever is defined forcomment
.