From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Theodor Thornhill via "Emacs development discussions."
<emacs-devel@gnu.org>
Cc: Yuan Fu <casouri@gmail.com>, Theodor Thornhill <theo@thornhill.no>
Subject: Re: Remove js--treesit-backward-up-list or fix it
Date: Sat, 29 Oct 2022 15:20:03 -0400 [thread overview]
Message-ID: <jwvleoy8mma.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87h6zmscqj.fsf@thornhill.no> (Theodor Thornhill via's message of "Sat, 29 Oct 2022 20:31:32 +0200")
> 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
next prev parent reply other threads:[~2022-10-29 19:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8B978AF7-B1CA-4C8A-9E89-84D0DEC7884C@gmail.com>
[not found] ` <87h6znxkr0.fsf@thornhill.no>
[not found] ` <0849BE6B-B5B4-47E0-B4EA-F93F6947C2B7@gmail.com>
2022-10-29 18:31 ` Remove js--treesit-backward-up-list or fix it Theodor Thornhill via Emacs development discussions.
2022-10-29 19:07 ` Yuan Fu
2022-10-29 19:31 ` Theodor Thornhill via Emacs development discussions.
2022-10-29 20:08 ` Yuan Fu
2022-10-29 20:12 ` Theodor Thornhill via Emacs development discussions.
2022-10-29 19:20 ` Stefan Monnier [this message]
2022-10-29 19:30 ` Theodor Thornhill via Emacs development discussions.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvleoy8mma.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).