]> git.eshelyaron.com Git - emacs.git/commit
Fix indentation of "{" on a new line of a function declaration
authorVincenzo Pupillo <v.pupillo@gmail.com>
Sat, 19 Apr 2025 20:58:39 +0000 (22:58 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 21 Apr 2025 20:41:29 +0000 (22:41 +0200)
commitc0a946c682a0008bab8d6e46844af251169d93db
tree5dacf61b03e97358c47d002f93207400070ac13b
parent7e8a8fa2aa1862cf05b54dd5509940e3b2abe745
Fix indentation of "{" on a new line of a function declaration

* lisp/progmodes/js.el (js--treesit-switch-body-helper): New
anchor helper function for the switch_body.
(js--treesit-member-chained-expression-helper): New anchor
helper function for chained calls in member_expression.
(js--treesit-arrow-function-helper): New anchor helper
function for arrow_function.
(js--treesit-indent-rules): Fix rule for the indentation of
"{" when of a new line of a function declaration.  (Bug#76704)
Fix the indentation of the parent of arrow_function, member_expression,
switch_body, ternary_expression and sequence_expression.

(cherry picked from commit 4428077c2bea73570cfe9f9d6b40809aeda7f5c9)
lisp/progmodes/js.el