From f1e058d46b5a83ddd0423a3616aa50ac3ec7f551 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sat, 15 Oct 2022 16:09:35 -0700 Subject: [PATCH] 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. --- lisp/progmodes/ts-mode.el | 2 ++ 1 file changed, 2 insertions(+) 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") -- 2.39.2