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 message dated Sun, 1 Jun 2025 16:17:06 -0700
with message-id <4569E7A9-D209-42BF-A4BF-D616FA13B01C <at> gmail.com>
and subject line Re: bug#77901: tsx-ts-mode: ternary chains are indented as a tree
has caused the debbugs.gnu.org bug report #77901,
regarding tsx-ts-mode: ternary chains are indented as a tree
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> 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)]
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?
[Message part 3 (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
This bug report was last modified 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.