GNU bug report logs -
#76704
30.1; Indentation of braces on separate line in js-ts-mode
Previous Next
Reported by: Fabian Brosda <f.brosda <at> gmx.de>
Date: Mon, 3 Mar 2025 04:33:03 UTC
Severity: minor
Found in version 30.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #46 received at 76704 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ciao Fabian, I've fixed these two things (I hope!).
The new patch is attached.
Vincenzo
In data mercoledì 2 aprile 2025 10:51:05 Ora legale dell’Europa centrale,
Fabian Brosda ha scritto:
> Hi Vincenzo,
>
> > For switch body indentation now possible to use js-switch-indent-offset as
> > in js-mode.
>
> Testing this, the results are different in js-mode and js-ts-mode. js-mode
> applies the offset only if the brace is on the same line, while
> js-ts-mode applies it only, if the brace is on a separate line. I
> updated the gist, and used js-switch-indent-offset = 2, to distinguish
> it from the regular indentation.
>
> > Can you please try it again?
>
> I also tested in a couple of projects and found one difference when
> using ternary operators and putting the whole expression in parenthesis.
> I also added it to the gist. Note, that only the combination of
> parenthesis and ternary operator is different, the other two cases are
> the same.
>
> But otherwise I could not find any more differences and the original
> case with braces on separate lines also works very well :-)
>
> Fabian
[0001-Fix-indentation-of-when-on-a-new-line-of-a-function-.patch (text/x-patch, attachment)]
This bug report was last modified 90 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.