aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-02-16 11:47:10 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-02-17 13:24:12 +0100
commit17d68ac13c902f55253b7facb47df4c0ae532575 (patch)
tree7a3657687a239f6fce1c6f62917f0034a9e04073
parentfeat(latex): more text func highlights (diff)
downloadnvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.tar
nvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.tar.gz
nvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.tar.bz2
nvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.tar.lz
nvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.tar.xz
nvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.tar.zst
nvim-treesitter-17d68ac13c902f55253b7facb47df4c0ae532575.zip
feat(rust): add doc comments
-rw-r--r--queries/rust/highlights.scm17
1 files changed, 4 insertions, 13 deletions
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm
index c651f34fa..f5fff58d0 100644
--- a/queries/rust/highlights.scm
+++ b/queries/rust/highlights.scm
@@ -220,20 +220,11 @@
(block_comment)
] @comment @spell
-((line_comment) @comment.documentation
- (#lua-match? @comment.documentation "^///[^/]"))
+(line_comment
+ (doc_comment)) @comment.documentation
-((line_comment) @comment.documentation
- (#lua-match? @comment.documentation "^///$"))
-
-((line_comment) @comment.documentation
- (#lua-match? @comment.documentation "^//!"))
-
-((block_comment) @comment.documentation
- (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
-
-((block_comment) @comment.documentation
- (#lua-match? @comment.documentation "^/[*][!]"))
+(block_comment
+ (doc_comment)) @comment.documentation
(boolean_literal) @boolean