]> git.eshelyaron.com Git - emacs.git/commit
Limit matches of treesit-thing-settings in js-ts-mode (bug#71244)
authorJuri Linkov <juri@linkov.net>
Fri, 31 May 2024 06:34:28 +0000 (09:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 1 Jun 2024 17:04:58 +0000 (19:04 +0200)
commitaae9030481a8711093acd5e3e4f67afe7baf73e7
treedf83a1fc62c410a122a97832641843ca05f2e09b
parent1838ecb16592ab4b3a2af4fca6874f92d84e2860
Limit matches of treesit-thing-settings in js-ts-mode (bug#71244)

* lisp/progmodes/js.el (js-ts-mode): Use 'js--regexp-opt-symbol'
for 'js--treesit-sexp-nodes', 'js--treesit-sentence-nodes' and 'text'
that wraps the regexp in \_< and \_> delimiters to avoid false positives
such as "expression" used for "expression_statement".
(js--treesit-sexp-nodes): Add more useful nodes "parenthesized_expression",
"formal_parameters", "statement_block", "object", "object_pattern",
"named_imports", "class_body".

(cherry picked from commit 87e4e1beab05c297c6a4b2b159dd07246381884f)
lisp/progmodes/js.el