Subject: bug#79398: [PATCH] 31.0.50; csharp-ts-mode has various indentation bugs

From: Jostein Kjønigsen <[email-masked]>
Date: Sat, 6 Sep 2025 23:17:49 +0200

Hey everyone.

When writing new code with csharp-ts-mode, I've noticed there are a few cases where indentation is not automatically correct according to what is natural, nor what is convention.

For some cases, the indentation falls back to 0-indentation, and you have to manually add all the indentation back for things to look normal.

Examples:

- method call chains across several lines (indentation wrong on new-line)
- creating new objects (indentation wrong on first line after "new" - being unindented)
- array creation expressions (indentation wrong on second line, the one containing { - being overly indented )

Attached is a patch which fixes these behaviours.

—
Kind Regards
Jostein Kjønigsen

￼