diff options
| author | Juri Linkov | 2024-09-01 20:02:12 +0300 |
|---|---|---|
| committer | Juri Linkov | 2024-09-01 20:02:12 +0300 |
| commit | 0155f2ae2c84c649452b0eaac3fd247a37e4eaff (patch) | |
| tree | 7c35095dc6bc774750548233518eb1dd772f84c8 | |
| parent | dc2cdd36835cdce9426d0f822590a0d2f47d0bcc (diff) | |
| download | emacs-0155f2ae2c84c649452b0eaac3fd247a37e4eaff.tar.gz emacs-0155f2ae2c84c649452b0eaac3fd247a37e4eaff.zip | |
* lisp/progmodes/js.el: Improve sexp navigation in js-ts-mode (bug#72573)
(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'.
| -rw-r--r-- | lisp/progmodes/js.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 75c8111035c..14ae4068263 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -3861,11 +3861,14 @@ See `treesit-thing-settings' for more information.") | |||
| 3861 | "array" | 3861 | "array" |
| 3862 | "function" | 3862 | "function" |
| 3863 | "string" | 3863 | "string" |
| 3864 | "template_string" | ||
| 3865 | "template_substitution" | ||
| 3864 | "escape" | 3866 | "escape" |
| 3865 | "template" | 3867 | "template" |
| 3866 | "regex" | 3868 | "regex" |
| 3867 | "number" | 3869 | "number" |
| 3868 | "identifier" | 3870 | "identifier" |
| 3871 | "property_identifier" | ||
| 3869 | "this" | 3872 | "this" |
| 3870 | "super" | 3873 | "super" |
| 3871 | "true" | 3874 | "true" |
| @@ -3929,7 +3932,7 @@ See `treesit-thing-settings' for more information.") | |||
| 3929 | (sexp ,(js--regexp-opt-symbol js--treesit-sexp-nodes)) | 3932 | (sexp ,(js--regexp-opt-symbol js--treesit-sexp-nodes)) |
| 3930 | (sentence ,(js--regexp-opt-symbol js--treesit-sentence-nodes)) | 3933 | (sentence ,(js--regexp-opt-symbol js--treesit-sentence-nodes)) |
| 3931 | (text ,(js--regexp-opt-symbol '("comment" | 3934 | (text ,(js--regexp-opt-symbol '("comment" |
| 3932 | "template_string")))))) | 3935 | "string_fragment")))))) |
| 3933 | 3936 | ||
| 3934 | ;; Fontification. | 3937 | ;; Fontification. |
| 3935 | (setq-local treesit-font-lock-settings js--treesit-font-lock-settings) | 3938 | (setq-local treesit-font-lock-settings js--treesit-font-lock-settings) |