[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 00:25:29 +0100 |
On Thu, Mar 30, 2023 at 12:13 AM Herman, Géza <geza.herman@gmail.com> wrote:
>
>
> João Távora <joaotavora@gmail.com> writes:
>
> > And then my personal opinion is that it is an annoying
> > feature to have on by default as it whole lines about.
> > Having electric-indent-chars set to '(?\n), like c++-mode
> > has, is fine.
> While c++-mode has only ?\n in electric-indent-chars, it does electric
> indentation by other means. For example, ":" is bound to c-electric-colon,
> which behaves the same as you described c++-ts-mode previously: the
> "std" keeps dancing around as you put one and then two colons after it.
>
> In my opinion, this issue has two different parts:
>
> 1. design problem which cannot be really solved. Like this "std::"
> thing. The editor cannot read the programmer's mind (whether they will
> put a second colon or not). And because c++-mode behaves the same, I
> don't really think this is a bug. Or at least it is just a small one.
If we're going to use c++-mode as a reference, then, without
electric-pair-mode you get another class of "bigger" bugs. Just type
emacs -Q thingy.cpp -f c++-ts-mode
int main () { RET for (;;) {printf("infloop"); RET }
it still bounces around. c++-mode doesn't. Sure, you may say
"oh that's because the c++-ts-mode indenting is off". OK, then I say
"when/if it's ever fixed, then we can add these extra
electric-indent-chars".
João
- Re: treesit indentation "blinking", (continued)
- Re: treesit indentation "blinking", João Távora, 2023/03/25
- Re: treesit indentation "blinking", Dmitry Gutov, 2023/03/25
- Re: treesit indentation "blinking", Eli Zaretskii, 2023/03/25
- Re: treesit indentation "blinking", João Távora, 2023/03/25
- Re: treesit indentation "blinking", João Távora, 2023/03/28
- Re: treesit indentation "blinking", Daniel Colascione, 2023/03/28
- Re: treesit indentation "blinking", Eli Zaretskii, 2023/03/28
- Re: treesit indentation "blinking", João Távora, 2023/03/29
- Re: treesit indentation "blinking", Lynn Winebarger, 2023/03/29
- Re: treesit indentation "blinking", Herman , Géza, 2023/03/29
- Re: treesit indentation "blinking",
João Távora <=
- Re: treesit indentation "blinking", Herman , Géza, 2023/03/30
- Re: treesit indentation "blinking", Eli Zaretskii, 2023/03/30
- Re: treesit indentation "blinking", Dmitry Gutov, 2023/03/30
- Re: treesit indentation "blinking", João Távora, 2023/03/30
- Re: treesit indentation "blinking", João Távora, 2023/03/30
- Re: treesit indentation "blinking", Dmitry Gutov, 2023/03/30
- Re: treesit indentation "blinking", João Távora, 2023/03/30
- Re: treesit indentation "blinking", Dmitry Gutov, 2023/03/30
- Re: treesit indentation "blinking", João Távora, 2023/03/30
- Re: treesit indentation "blinking", Dmitry Gutov, 2023/03/30