]> git.eshelyaron.com Git - emacs.git/commit
Add jsdoc support to js-ts-mode
authorDamien Cassou <damien@cassou.me>
Fri, 14 Jun 2024 08:46:42 +0000 (10:46 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 24 Jun 2024 07:16:34 +0000 (09:16 +0200)
commit8b7af795dacafeda3a2121b6fd48cb0e47877138
tree934e20157c01d1e0e09213738d050949b03806cf
parent288c574a9efad63d04860be3f9f7202009a778bf
Add jsdoc support to js-ts-mode

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Add jsdoc
font-lock settings.
(js--treesit-jsdoc-beginning-regexp): New variable to match the
beginning of a jsdoc block.
(js-ts-mode): Add jsdoc support. Save the 'javascript parser to
`treesit-primary-parser'. Configure `treesit-range-settings' to
use a jsdoc parser within a JavaScript file.
(js-ts-language-at-point): New function to return either 'jsdoc or
'javascript depending on where the point is.

(cherry picked from commit 0edacf2aa7e53d0cec95bcaae4cd19e5389b70f8)
lisp/progmodes/js.el