diff --git a/src/omnisharp/extension.ts b/src/omnisharp/extension.ts index 9c0301f73..41ff8b50a 100644 --- a/src/omnisharp/extension.ts +++ b/src/omnisharp/extension.ts @@ -70,7 +70,7 @@ export function activate(context: vscode.ExtensionContext, reporter: TelemetryRe localDisposables.push(vscode.languages.registerRenameProvider(documentSelector, new RenameProvider(server, reporter))); if (options.useFormatting) { localDisposables.push(vscode.languages.registerDocumentRangeFormattingEditProvider(documentSelector, new FormatProvider(server, reporter))); - localDisposables.push(vscode.languages.registerOnTypeFormattingEditProvider(documentSelector, new FormatProvider(server, reporter), '}', ';')); + localDisposables.push(vscode.languages.registerOnTypeFormattingEditProvider(documentSelector, new FormatProvider(server, reporter), '}','{', ';','\n')); } localDisposables.push(vscode.languages.registerCompletionItemProvider(documentSelector, new CompletionItemProvider(server, reporter), '.', ' ')); localDisposables.push(vscode.languages.registerWorkspaceSymbolProvider(new WorkspaceSymbolProvider(server, reporter)));