From: Yuan Fu Date: Tue, 10 Jan 2023 05:31:38 +0000 (-0800) Subject: Highlight identifier in import statements in js-ts-mode X-Git-Tag: emacs-29.0.90~773 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8377ed5298f;p=emacs.git 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. --- 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