1.新增.editorconfig及omnisharp.json 2個檔案。
2.omnisharp.json內容如下:
{
"RoslynExtensionsOptions": {
"enableAnalyzersSupport": true,
"enableMsBuildLoadProjectsOnDemand": true
},
"FormattingOptions": {
"enableEditorConfigSupport": true
}
}
3..editorconfig內容如下:
#### C# Formatting Rules ##### New line preferencescsharp_new_line_before_catch = truecsharp_new_line_before_else = truecsharp_new_line_before_finally = truecsharp_new_line_before_members_in_anonymous_types = truecsharp_new_line_before_members_in_object_initializers = truecsharp_new_line_before_open_brace = nonecsharp_new_line_between_query_expression_clauses = true