]> git.eshelyaron.com Git - emacs.git/commitdiff
Update ts-mode font-lock to work with tree-sitter's :feature
authorYuan Fu <casouri@gmail.com>
Sat, 15 Oct 2022 23:09:35 +0000 (16:09 -0700)
committerYuan Fu <casouri@gmail.com>
Sat, 15 Oct 2022 23:09:35 +0000 (16:09 -0700)
* lisp/progmodes/ts-mode.el (ts-mode--settings): Add :feature flag.
(ts-mode): Set treesit-font-lock-feature-list.

lisp/progmodes/ts-mode.el

index 638dfa501354bfb4dc75462f01bff37f5d419307..10d4b7bd18bd11b28ef27b32388564c9e52dcaa3 100644 (file)
   (treesit-font-lock-rules
    :language 'tsx
    :override t
+   :feature 'basic
    '(
      (template_string) @font-lock-string-face
 
@@ -358,6 +359,7 @@ ARG is the same as in `end-of-defun."
 
     (setq-local treesit-font-lock-settings ts-mode--settings)
 
+    (setq treesit-font-lock-feature-list '((basic)))
     (treesit-font-lock-enable))
    (t
     (message "Tree sitter for TypeScript isn't available, defaulting to js-mode")