GNU bug report logs - #78121
tsx-ts-mode: wrong indentation of body with misindented args

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Mon, 28 Apr 2025 16:17:05 UTC

Severity: normal

Done: Yuan Fu <casouri <at> gmail.com>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Yuan Fu <casouri <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78121: closed (tsx-ts-mode: wrong indentation of body with
 misindented args)
Date: Mon, 26 May 2025 03:54:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 25 May 2025 20:53:13 -0700
with message-id <EBDA2EEF-7A7A-4065-A8AD-E002D8DBC681 <at> gmail.com>
and subject line Re: bug#78121: tsx-ts-mode: wrong indentation of body with misindented args
has caused the debbugs.gnu.org bug report #78121,
regarding tsx-ts-mode: wrong indentation of body with misindented args
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78121: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78121
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: tsx-ts-mode: wrong indentation of body with misindented args
Date: Mon, 28 Apr 2025 23:15:35 +0700
Given this TypeScript:

    const updatePage = (a1: string,
                        a2: number) => {
      return true;
    }

upon attempting to indent the `return true;` line it becomes indented as:

    const updatePage = (a1: string,
                        a2: number) => {
                          return true;
    }

which isn't expected.

P.S.: I'd note separately that a2 gets indented to 2 spaces, which even though goes in line with VSCode, I am not sure if it's useful. Does anybody even indent the second param to "2 spaces" when 1st param resides much further align-wise? C and C++ modes align 2-nd param to the 1st one, python-mode does too. Should perhaps tsx-ts-mode handle that similarly as well?


[Message part 3 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78121-done <at> debbugs.gnu.org
Subject: Re: bug#78121: tsx-ts-mode: wrong indentation of body with
 misindented args
Date: Sun, 25 May 2025 20:53:13 -0700
[Message part 4 (text/plain, inline)]

> On May 25, 2025, at 2:03 AM, Konstantin Kharlamov <Hi-Angel <at> yandex.ru> wrote:
> 
> On Sun, 2025-05-25 at 11:55 +0300, Eli Zaretskii wrote:
>>> Cc: 78121 <at> debbugs.gnu.org
>>> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
>>> Date: Sun, 25 May 2025 11:36:31 +0300
>>> 
>>> v5: I noticed I forgot to add the "*" bullets to the commit
>>> message,
>>> fixed.
>> 
>> Thanks, but if we are talking about formatting of the log messages,
>> then these ones have too long lines.  When we generate ChangeLog
>> files
>> from Git log, the log messages are indented 8 columns, so the longest
>> line should be 70 columns, and preferably 63.
> 
> Thanks, done (v6 attached)!
[1.patch (text/x-patch, attachment)]
[Message part 6 (text/plain, inline)]
Thank you! Merged to emacs-30.

Yuan

This bug report was last modified 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.