From: Dmitry Gutov Date: Fri, 8 Dec 2023 01:58:18 +0000 (+0200) Subject: (js--treesit-font-lock-settings): Highlight parameters in function expression X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e618687cb8b589184e749390b46b950d6dc8319e;p=emacs.git (js--treesit-font-lock-settings): Highlight parameters in function expression * lisp/progmodes/js.el (js--treesit-font-lock-settings): Highlight parameters in a function expression (the node type 'function'). Make the matcher for 'formal_parameters' independent of the parent, that just created duplication. --- diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index eee2f56b530..7b0fcb50853 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3536,14 +3536,7 @@ Check if a node type is available, then return the right indent rules." (method_definition name: (property_identifier) @font-lock-function-name-face) - (method_definition - parameters: (formal_parameters (identifier) @font-lock-variable-name-face)) - - (arrow_function - parameters: (formal_parameters (identifier) @font-lock-variable-name-face)) - - (function_declaration - parameters: (formal_parameters (identifier) @font-lock-variable-name-face)) + (formal_parameters (identifier) @font-lock-variable-name-face) (variable_declarator name: (identifier) @font-lock-variable-name-face)