GNU bug report logs -
#77901
tsx-ts-mode: ternary chains are indented as a tree
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#77901: tsx-ts-mode: ternary chains are indented as a tree
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 77901 <at> debbugs.gnu.org.
--
77901: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77901
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> On May 20, 2025, at 11:17 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>
>
>
>> On May 17, 2025, at 11:37 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
>>> Cc: casouri <at> gmail.com, 77901 <at> debbugs.gnu.org
>>> Date: Sat, 17 May 2025 23:48:41 +0700
>>>
>>> On Sat, 2025-05-17 at 13:10 +0300, Eli Zaretskii wrote:
>>>> Should this bug be closed now?
>>>
>>> Well, my problem is solved, because I use style where colons start the
>>> line. But if someone uses style where colons remain on the previous
>>> line, more work is needed. I guess it makes sense to keep an issue for
>>> such case, the question only if it should go to its own issue, or may
>>> be solved here as well.
>>
>> My question is, if we keep this open, who and how (and when) will
>> close it?
>
> I’ll close it. But give me sometimes since I’m busy in real life right now ;-)
>
> Yuan
Done by 8d132359d19
Yuan
[Message part 3 (message/rfc822, inline)]
Given this correctly indented code:
const a = cond1 ? 1
: cond2 ? 2
: cond3 ? 3
: 4;
if you reindent it, it turns into:
const a = cond1 ? 1
: cond2 ? 2
: cond3 ? 3
: 4;
Basically, for every colon it increases indentation. This is different
from other c-like languages (it's is indented as the first form
instead), and it's also different from Python. The "tree-indentation"
is not readable, so there's a reason other modes indent it as the
first example. Would it be possible to change in typescript mode as
well?
This bug report was last modified 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.