]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/js.el: Improve sexp navigation in js-ts-mode (bug#72573)
authorJuri Linkov <juri@linkov.net>
Sun, 1 Sep 2024 17:02:12 +0000 (20:02 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Sep 2024 07:51:57 +0000 (09:51 +0200)
(js--treesit-sexp-nodes): Add "template_string", "template_substitution",
"property_identifier".
(js-ts-mode): Replace "template_string" with "string_fragment"
in 'text' part of 'treesit-thing-settings'.

(cherry picked from commit 0155f2ae2c84c649452b0eaac3fd247a37e4eaff)

lisp/progmodes/js.el

index a338c19763fb5c15829f8b9923b9934b26a5f671..d75256c2e7c3bf38c55349552d6be84af105ee41 100644 (file)
@@ -3860,11 +3860,14 @@ See `treesit-thing-settings' for more information.")
     "array"
     "function"
     "string"
+    "template_string"
+    "template_substitution"
     "escape"
     "template"
     "regex"
     "number"
     "identifier"
+    "property_identifier"
     "this"
     "super"
     "true"
@@ -3928,7 +3931,7 @@ See `treesit-thing-settings' for more information.")
                    (sexp ,(js--regexp-opt-symbol js--treesit-sexp-nodes))
                    (sentence ,(js--regexp-opt-symbol js--treesit-sentence-nodes))
                    (text ,(js--regexp-opt-symbol '("comment"
-                                                   "template_string"))))))
+                                                   "string_fragment"))))))
 
     ;; Fontification.
     (setq-local treesit-font-lock-settings js--treesit-font-lock-settings)