]> git.eshelyaron.com Git - emacs.git/commit
Use JSX comments on jsx treesit nodes in js-ts-mode and tsx-ts-mode
authorJuri Linkov <juri@linkov.net>
Wed, 14 May 2025 06:57:40 +0000 (09:57 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 14 May 2025 12:35:26 +0000 (14:35 +0200)
commit6fcab5a203fadefc21efc11e806f71fda96e5a89
tree53172595d5a24047dcaed0835da4553c93206812
parentf829371ba6cca1b2f601bb88e975211126a7fb6b
Use JSX comments on jsx treesit nodes in js-ts-mode and tsx-ts-mode

* lisp/progmodes/js.el (js--treesit-comment-jsx): New internal variable.
(js--treesit-comment-setup): New function.
(js-ts-mode): Set buffer-local 'comment-setup-function' to
'js--treesit-comment-setup'.

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Set buffer-local 'comment-setup-function' to 'js--treesit-comment-setup'.

(cherry picked from commit 8bccccedb65a6d3991c41398effa9317adaec873)
lisp/progmodes/js.el
lisp/progmodes/typescript-ts-mode.el