[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: treesit indentation "blinking"

From: João Távora
Subject: Re: treesit indentation "blinking"
Date: Thu, 30 Mar 2023 11:00:00 +0100

On Thu, Mar 30, 2023 at 10:36 AM Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 30/03/2023 12:28, João Távora wrote:
> > This problematic already counts as "bouncing" to me, for some meaning of
> > "bouncing". c++-mode doesn't behave like that because indentation is
> > already where it is supposed to be if you type that sequence of
> > keystrokes.
> Okay, if that's what you meant.
> I think this one (indentation after RET in an incomplete function
> definition) should be fixed in the indentation rules. The contents of
> electric-indent-chars won't fix it either way.

This is all down to indentation rules, that's how electric-indent-mode
decides what to do.  My point is that having electric-indent-chars be
this ambitious with "broken" indentation rules isn't a good place to

What counts as "broken" indentation is also arguable though. When dealing
with invalid programs, there is really no "right" or "wrong" indentation.
See my message https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62412#14 where
I show cases where c++-ts-mode's answer to indenting an invalid program
makes more sense than c++-mode's answer.

Whatever the indentation rules, the current bouncing is so jarring
that it really doesn't encourage people to try switching to
c++-ts-mode, get used to its set of indentation rules, and then perhaps
experience its other benefits like, say, performance or simplicity.

At least it didn't for me.  I'm back to c++-mode atm.

In my opinion electric-indent-char should be reduced to the default
and should be added criteriously as the indentation rules they trigger
are fixed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]