bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#62412: 29.0.60; strange c++ indentation behavior with tree sitter


From: Herman
Subject: bug#62412: 29.0.60; strange c++ indentation behavior with tree sitter
Date: Sat, 25 Mar 2023 14:48:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1



On 3/25/23 12:43, João Távora wrote:

There can be no "correct" indentation in a buffer with an invalid state.

But there are heuristics.  Here, it can be argued that c++-mode's
heuristics are better.
I agree. In my opinion, c++-mode's heuristics are good. Tree-sitter support is new, it's expected that it won't work perfectly. Also, it doesn't have to handle any invalid program. But, while writing a program, it should handle indentation sensibly. I don't think that it's a good approach that everybody who uses electric indent should get used to the fact that whenever they writing a for loop, the line will jump around. It's a bad experience.

Anyways, feel free to close this issue if you think otherwise. I just disabled ';'-caused auto indenting, so I don't see this unpleasant behavior any more.





reply via email to

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