From e2e937300f5a68ce1e2a349a583859a29394ac5f Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Thu, 12 Jan 2023 09:06:45 +0100 Subject: [PATCH] Fix indentation of object_expressions in csharp-ts-mode * lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules): Make sure the opening brace is indented at parent-bol, and everything else is indented. --- lisp/progmodes/csharp-mode.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 79afd7f91dc..81ce41618e7 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -640,6 +640,11 @@ compilation and evaluation time conflicts." ((parent-is "namespace_declaration") parent-bol 0) ((parent-is "class_declaration") parent-bol 0) ((parent-is "constructor_declaration") parent-bol 0) + ((parent-is "initializer_expression") parent-bol csharp-ts-mode-indent-offset) + ((match "{" "anonymous_object_creation_expression") parent-bol 0) + ((parent-is "anonymous_object_creation_expression") parent-bol csharp-ts-mode-indent-offset) + ((match "{" "object_creation_expression") parent-bol 0) + ((parent-is "object_creation_expression") parent-bol 0) ((parent-is "method_declaration") parent-bol 0) ((parent-is "enum_declaration") parent-bol 0) ((parent-is "operator_declaration") parent-bol 0) -- 2.39.2