]> git.eshelyaron.com Git - emacs.git/commitdiff
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)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 07:24:39 +0000 (09:24 +0200)
* lisp/progmodes/js.el (js-ts-mode): Add "description" to
`c-ts-common--comment-regexp'.

(cherry picked from commit 3f6e7e1da682b708ece0ac79b9c6b8acb357d729)

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