[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed sta
From: |
Yuan Fu |
Subject: |
bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements |
Date: |
Sat, 18 Nov 2023 20:26:36 -0800 |
> On Nov 18, 2023, at 2:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> Date: Thu, 16 Nov 2023 03:18:44 +0200
>> Cc: 67031@debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> On 15/11/2023 15:40, Eli Zaretskii wrote:
>>>> From: nvp<noah.v.peart@gmail.com>
>>>> Date: Thu, 9 Nov 2023 17:29:21 -0800
>>>>
>>>> Tags: patch
>>>>
>>>> * lisp/progmodes/typescript-ts-mode.el
>>>> (typescript-ts-mode--indent-rules): fix indentation after statements
>>>> without brackets
>>>>
>>>> Bug: There are no indentation rules for statement bodies following
>>>> if/for/for_in/do/while statements without brackets.
>>>>
>>>> Recipe to reproduce:
>>>> In a `typescript-ts-mode` buffer with the following code,
>>>>
>>>> if (true)
>>>> console.log('No indent here')
>>>>
>>>> Try to indent the second line.
>>> Dmitry, Yuan: any comments?
>>
>> I think it would be cool if the patch added a corresponding new case or
>> two in test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
>
> Noah, would you please add such tests?
>
> Yuan, any comments or suggestions?
LGTM, I’ll also add else_clause too, like
((parent-is ,(rx (or (seq (or "if" "for" "for_in" "while" "do") "_statement")
"else_clause")))
parent-bol typescript-ts-mode-indent-offset)
Yuan
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, (continued)
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Noah Peart, 2023/11/20
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Dmitry Gutov, 2023/11/20
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Eli Zaretskii, 2023/11/20
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Noah Peart, 2023/11/20
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Eli Zaretskii, 2023/11/21
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Dmitry Gutov, 2023/11/21
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Eli Zaretskii, 2023/11/21
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Dmitry Gutov, 2023/11/21
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Yuan Fu, 2023/11/24
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements, Yuan Fu, 2023/11/24
- bug#67031: [PATCH] Fix typescript-ts-mode indentation in unbracketed statements,
Yuan Fu <=