From cd3336908a38cfeafffc2dbf4059ce7f254ae7b1 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Sun, 21 Jul 2024 21:32:34 +0200 Subject: [PATCH] js-ts-mode: Make jsdoc's "description" block a comment (bug#72461) * lisp/progmodes/js.el (js-ts-mode): Add "description" to `c-ts-common--comment-regexp'. (cherry picked from commit 3f6e7e1da682b708ece0ac79b9c6b8acb357d729) --- lisp/progmodes/js.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f8140c14a49..75c8111035c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3946,7 +3946,9 @@ See `treesit-thing-settings' for more information.") :embed 'jsdoc :host 'javascript :local t - `(((comment) @capture (:match ,js--treesit-jsdoc-beginning-regexp @capture)))))) + `(((comment) @capture (:match ,js--treesit-jsdoc-beginning-regexp @capture))))) + + (setq c-ts-common--comment-regexp (rx (or "comment" "line_comment" "block_comment" "description")))) ;; Imenu (setq-local treesit-simple-imenu-settings -- 2.39.2