From ee9677687d455023466fcf1987458e3fa08fb1a8 Mon Sep 17 00:00:00 2001 From: Sophie <70588905+probablySophie@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:11:48 +0800 Subject: [PATCH 1/3] Documentation comments for Rust --- runtime/queries/rust/highlights.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 2981075fb..def29cb66 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -30,6 +30,7 @@ (string_literal) (raw_string_literal) ] @string +(line_comment (doc_comment)) @comment.documentation [ (line_comment) (block_comment) From 707147362b11b4e4c7cc6f4e616849c2b2ed3619 Mon Sep 17 00:00:00 2001 From: Sophie <70588905+probablySophie@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:13:15 +0800 Subject: [PATCH 2/3] Documentation comments for Python --- runtime/queries/python/highlights.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm index 9f7d2790c..04adb3002 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 From 46a6b8cfe7cf2391937af6f5ca5238ea4369c985 Mon Sep 17 00:00:00 2001 From: Sophie <70588905+probablySophie@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:14:10 +0800 Subject: [PATCH 3/3] Whoops, someone forgot block documentation comments --- runtime/queries/rust/highlights.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index def29cb66..88374704a 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -31,6 +31,7 @@ (raw_string_literal) ] @string (line_comment (doc_comment)) @comment.documentation +(block_comment (doc_comment)) @comment.block.documentation [ (line_comment) (block_comment)