From 7fea1add0e1f128133dc9d674b062366de6f8265 Mon Sep 17 00:00:00 2001 From: Akshita Agarwal Date: Mon, 4 Dec 2017 18:01:13 -0800 Subject: [PATCH] Added opening brace as a trigger character --- .../Workers/Formatting/FormattingWorker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OmniSharp.Roslyn.CSharp/Workers/Formatting/FormattingWorker.cs b/src/OmniSharp.Roslyn.CSharp/Workers/Formatting/FormattingWorker.cs index f64b3c76c1..4bfdaa0930 100644 --- a/src/OmniSharp.Roslyn.CSharp/Workers/Formatting/FormattingWorker.cs +++ b/src/OmniSharp.Roslyn.CSharp/Workers/Formatting/FormattingWorker.cs @@ -25,7 +25,7 @@ public static async Task> GetFormattingC return await GetFormattingChanges(document, targetLine.Start, targetLine.End); } } - else if (character == '}' || character == ';') + else if (character == '}' || character == ';' || character == '{') { // format after ; and } var root = await document.GetSyntaxRootAsync();