🌑

工作備忘錄

VS Code使用EditorConfig設定

1.新增.editorconfig及omnisharp.json 2個檔案。

2.omnisharp.json內容如下:

{
    "RoslynExtensionsOptions": {
        "enableAnalyzersSupport": true,
        "enableMsBuildLoadProjectsOnDemand": true
    },
    "FormattingOptions": {
        "enableEditorConfigSupport": true
    }
}
3..editorconfig內容如下:
#### C# Formatting Rules ####

  


# New line preferences



csharp_new_line_before_catch = true



csharp_new_line_before_else = true



csharp_new_line_before_finally = true



csharp_new_line_before_members_in_anonymous_types = true



csharp_new_line_before_members_in_object_initializers = true



csharp_new_line_before_open_brace = none



csharp_new_line_between_query_expression_clauses = true

— 2021年7月27日

Search