js-ts-mode: Make jsdoc's "description" block a comment (bug#72461)
authorDamien Cassou <damien@cassou.me>
Sun, 21 Jul 2024 19:32:34 +0000 (21:32 +0200)
committerYuan Fu <casouri@gmail.com>
Mon, 5 Aug 2024 03:18:48 +0000 (20:18 -0700)
* lisp/progmodes/js.el (js-ts-mode): Add "description" to
`c-ts-common--comment-regexp'.

lisp/progmodes/js.el

index f8140c14a498193ce36a4e4cf8568602a49b43da..75c8111035c470a53f40bdf9edf6917cd8941a97 100644 (file)
@@ -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