[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remove js--treesit-backward-up-list or fix it
From: |
Stefan Monnier |
Subject: |
Re: Remove js--treesit-backward-up-list or fix it |
Date: |
Sat, 29 Oct 2022 15:20:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> Because of all the stuff we set before we init tree sitter we get a
> super unwanted behavior of the cursor jumping back to indentation for
> every () {} etc. This is because of these settings, which are IMO pretty
> bad defaults:
> ```
> (setq-local electric-indent-chars
> (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds
> "[]*".
> (setq-local electric-layout-rules
> '((?\; . after) (?\{ . after) (?\} . before)))
> ```
While these may be bad defaults, they should provide reasonable
behavior, so if you get cursor jumping with such settings, then we
should fix that regardless if its the default.
Stefan