]> git.eshelyaron.com Git - emacs.git/commitdiff
(js--treesit-font-lock-settings): Highlight parameters in function expression
authorDmitry Gutov <dmitry@gutov.dev>
Fri, 8 Dec 2023 01:58:18 +0000 (03:58 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Dec 2023 19:12:33 +0000 (20:12 +0100)
* 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.

lisp/progmodes/js.el

index eee2f56b530fc5cb51ed6bf6bcd7152e9a571eb4..7b0fcb508531bf76d2f36f5aef195d2cdbbb1494 100644 (file)
@@ -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)