diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm index 9f7d2790ceb4..04adb3002b52 100644 --- a/runtime/queries/python/highlights.scm +++ b/runtime/queries/python/highlights.scm @@ -111,6 +111,9 @@ (integer) @constant.numeric.integer (float) @constant.numeric.float +(expression_statement (string) @content + (#match? @content "^\"\"\"") +) @comment.block.documentation (comment) @comment (string) @string (escape_sequence) @constant.character.escape diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 2981075fb07c..88374704afa5 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -30,6 +30,8 @@ (string_literal) (raw_string_literal) ] @string +(line_comment (doc_comment)) @comment.documentation +(block_comment (doc_comment)) @comment.block.documentation [ (line_comment) (block_comment)