From: Yuan Fu Date: Sat, 15 Oct 2022 23:09:35 +0000 (-0700) Subject: Update ts-mode font-lock to work with tree-sitter's :feature X-Git-Tag: emacs-29.0.90~1830 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1e058d46b5a83ddd0423a3616aa50ac3ec7f551;p=emacs.git Update ts-mode font-lock to work with tree-sitter's :feature * lisp/progmodes/ts-mode.el (ts-mode--settings): Add :feature flag. (ts-mode): Set treesit-font-lock-feature-list. --- diff --git a/lisp/progmodes/ts-mode.el b/lisp/progmodes/ts-mode.el index 638dfa50135..10d4b7bd18b 100644 --- a/lisp/progmodes/ts-mode.el +++ b/lisp/progmodes/ts-mode.el @@ -108,6 +108,7 @@ (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")