From: Dmitry Gutov Date: Fri, 8 Dec 2023 02:20:39 +0000 (+0200) Subject: js-ts-mode: Highlight function parameters inside destructuring X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc9b733ab88;p=emacs.git js-ts-mode: Highlight function parameters inside destructuring * lisp/progmodes/js.el (js--treesit-font-lock-settings): Highlight function parameters declared using destructuring syntax. --- diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index eb4adc627ee..07d12cb7b4b 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3545,7 +3545,10 @@ Check if a node type is available, then return the right indent rules." (method_definition name: (property_identifier) @font-lock-function-name-face) - (formal_parameters (identifier) @font-lock-variable-name-face) + (formal_parameters + [(identifier) @font-lock-variable-name-face + (array_pattern (identifier) @font-lock-variable-name-face) + (object_pattern (shorthand_property_identifier_pattern) @font-lock-variable-name-face)]) (variable_declarator name: (identifier) @font-lock-variable-name-face)