emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 8377ed5298 1/2: Highlight identifier in import statements in js


From: Yuan Fu
Subject: emacs-29 8377ed5298 1/2: Highlight identifier in import statements in js-ts-mode
Date: Tue, 10 Jan 2023 00:46:55 -0500 (EST)

branch: emacs-29
commit 8377ed5298f0529512294956269dcd06a8e6ed18
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    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 fe483f220d..058c8907bb 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]