]> git.eshelyaron.com Git - emacs.git/commitdiff
Highlight identifier in import statements in js-ts-mode
authorYuan Fu <casouri@gmail.com>
Tue, 10 Jan 2023 05:31:38 +0000 (21:31 -0800)
committerYuan Fu <casouri@gmail.com>
Tue, 10 Jan 2023 05:31:38 +0000 (21:31 -0800)
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

index fe483f220da48eedf683480d9996a7324119a13d..058c8907bb5976ae725025fdb9c92bfd37730c52 100644 (file)
@@ -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