[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 83ed9018ede 2/4: (js--treesit-font-lock-settings): Highlight pa
From: |
Dmitry Gutov |
Subject: |
emacs-29 83ed9018ede 2/4: (js--treesit-font-lock-settings): Highlight parameters in function expression |
Date: |
Thu, 7 Dec 2023 21:21:44 -0500 (EST) |
branch: emacs-29
commit 83ed9018ede57f6ef0e3645147fdb529490268fc
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
(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.
---
lisp/progmodes/js.el | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index b3c0f18e7b5..03f34647288 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -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)