[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 c92360c7a3b 2/2: typescript-ts-mode: Highlight non-shorthand de
From: |
Dmitry Gutov |
Subject: |
emacs-29 c92360c7a3b 2/2: typescript-ts-mode: Highlight non-shorthand destructuring bindings |
Date: |
Fri, 24 Feb 2023 20:55:04 -0500 (EST) |
branch: emacs-29
commit c92360c7a3bf8f33d4fe4e7cc351c33ab4a7d5ca
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
typescript-ts-mode: Highlight non-shorthand destructuring bindings
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Highlight non-shorthand
variable bindings in object destructuring.
---
lisp/progmodes/typescript-ts-mode.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/typescript-ts-mode.el
b/lisp/progmodes/typescript-ts-mode.el
index 64af5574f9f..5b49b8f50a8 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -272,7 +272,9 @@ Argument LANGUAGE is either `typescript' or `tsx'."
:language language
:feature 'pattern
`((pair_pattern
- key: (property_identifier) @font-lock-property-ref-face)
+ key: (property_identifier) @font-lock-property-ref-face
+ value: [(identifier) @font-lock-variable-name-face
+ (assignment_pattern left: (identifier)
@font-lock-variable-name-face)])
(array_pattern (identifier) @font-lock-variable-name-face)