From 8377ed5298f0529512294956269dcd06a8e6ed18 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Mon, 9 Jan 2023 21:31:38 -0800 Subject: [PATCH] Highlight identifier in import statements in js-ts-mode Follow-up on bug#60689. This commit just copied the change in e385c099b8c to js-ts-mode. * lisp/progmodes/js.el: (js--treesit-font-lock-settings): Add import query. --- lisp/progmodes/js.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index fe483f220da..058c8907bb5 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3542,7 +3542,10 @@ This function is intended for use in `after-change-functions'." (identifier) (identifier) @font-lock-function-name-face) - value: (array (number) (function)))) + value: (array (number) (function))) + (import_clause (identifier) @font-lock-variable-name-face) + (import_clause (named_imports (import_specifier (identifier)) + @font-lock-variable-name-face))) :language 'javascript :feature 'property -- 2.39.2