]> 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)
committerDmitry Gutov <dmitry@gutov.dev>
Fri, 8 Dec 2023 01:58:18 +0000 (03:58 +0200)
* 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 b3c0f18e7b5e9526fd31cffd0fb3f1a5bcb04b3a..03f3464728815e82c8be263ba04374b67f29a189 100644 (file)
@@ -3545,14 +3545,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)