unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Theodor Thornhill via "Emacs development discussions." <emacs-devel@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	"Theodor Thornhill via Emacs development discussions."
	<emacs-devel@gnu.org>
Cc: Yuan Fu <casouri@gmail.com>
Subject: Re: Remove js--treesit-backward-up-list or fix it
Date: Sat, 29 Oct 2022 21:30:24 +0200	[thread overview]
Message-ID: <877d0ijulr.fsf@thornhill.no> (raw)
In-Reply-To: <jwvleoy8mma.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 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.
>

Yuan fixed it :-)

-- 
Theo



      reply	other threads:[~2022-10-29 19:30 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
2022-10-29 19:30         ` Theodor Thornhill via Emacs development discussions. [this message]

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=877d0ijulr.fsf@thornhill.no \
    --to=emacs-devel@gnu.org \
    --cc=casouri@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --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).