From c92360c7a3bf8f33d4fe4e7cc351c33ab4a7d5ca Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 25 Feb 2023 03:54:31 +0200 Subject: [PATCH] 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) -- 2.39.5