diff options
author | Jostein Kjønigsen <jostein@kjonigsen.net> | 2023-01-02 21:26:36 +0100 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-01-02 14:25:55 -0800 |
commit | 68e68dfeefe0ac64d4ec6c31d046ae5957741109 (patch) | |
tree | 5a5a9a07c1ed741106e54854e38be377c8da7236 /lisp/progmodes/js.el | |
parent | aef869e74f47bbe00c8cf0cb02cea20aa0c33a6d (diff) | |
download | emacs-68e68dfeefe0ac64d4ec6c31d046ae5957741109.tar.gz |
Improve fontification consistency in js-ts-mode (bug#60503)
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Highlight
declared parameters in functions, methods and arrow-expressions as
variables.
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r-- | lisp/progmodes/js.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index c5fdecae71b..050472002bb 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -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) |