]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve fontification consistency in js-ts-mode (bug#60503)
authorJostein Kjønigsen <jostein@kjonigsen.net>
Mon, 2 Jan 2023 20:26:36 +0000 (21:26 +0100)
committerYuan Fu <casouri@gmail.com>
Mon, 2 Jan 2023 22:25:55 +0000 (14:25 -0800)
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Highlight
declared parameters in functions, methods and arrow-expressions as
variables.

lisp/progmodes/js.el

index c5fdecae71b8a7dd1773ab4c4f1742064c6f06b4..050472002bb6f7c9bd9b5e6702dbb20402c39133 100644 (file)
@@ -3521,6 +3521,15 @@ This function is intended for use in `after-change-functions'."
      (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))
+
      (variable_declarator
       name: (identifier) @font-lock-variable-name-face)