summaryrefslogtreecommitdiff
path: root/lisp/progmodes/js.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-01-09 21:31:38 -0800
committerYuan Fu <casouri@gmail.com>2023-01-09 21:31:38 -0800
commit8377ed5298f0529512294956269dcd06a8e6ed18 (patch)
tree92dd097274853d13a9f63a8957e346069bbac4ae /lisp/progmodes/js.el
parentaa9df1260c3fe5e872bef926288ce345bedbe1bb (diff)
downloademacs-8377ed5298f0529512294956269dcd06a8e6ed18.tar.gz
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.
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r--lisp/progmodes/js.el5
1 files changed, 4 insertions, 1 deletions
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