]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve fontification for import-statements in typescript-ts-mode
authorJostein Kjønigsen <jostein@kjonigsen.net>
Mon, 9 Jan 2023 10:17:53 +0000 (11:17 +0100)
committerYuan Fu <casouri@gmail.com>
Tue, 10 Jan 2023 04:06:06 +0000 (20:06 -0800)
(bug#60689)

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--font-lock-settings): Add rules to highlight the
actual imports in import-statements.

lisp/progmodes/typescript-ts-mode.el

index b26dca101dbd98fbb2f144c5b819b27ebd78af16..037d5c8e87e5c0b6f634e22db3ca9abc0d4c322c 100644 (file)
@@ -197,7 +197,10 @@ Argument LANGUAGE is either `typescript' or `tsx'."
       value: (array (number) (function)))
 
      (catch_clause
-      parameter: (identifier) @font-lock-variable-name-face))
+      parameter: (identifier) @font-lock-variable-name-face)
+
+     (import_clause (identifier) @font-lock-variable-name-face)
+     (import_clause (named_imports (import_specifier (identifier)) @font-lock-variable-name-face)))
 
    :language language
    :override t