How set C# omnisharp.json and .editorconfig in VScode?

116 Views Asked by At

3 month ago, I set "NewLinesForBracesInAccessors": false, in omnisharp.json. It can be solved.

But today, I update VScode and C# expansion. omnisharp.json it can't solve.

I want to set "NewLinesForBracesInAccessors": false, in omnisharp.json. But is can't solve.

And I set "omnisharp.enableEditorConfigSupport": false, in VScode stting. But is can't solve.

So, I think I need edit .editorconfig or omnisharp.json.

If you known. Please help me. Thanks.

.editorconfig

[*.cs]
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

omnisharp.json

{
"RoslynExtensionsOptions": {
    "enableAnalyzersSupport": true
},
"FormattingOptions": {
   "enableEditorConfigSupport": false,
   "newLine": "\n",
   "useTabs": false,
   "tabSize": 4,
   "indentationSize": 4,

   "NewLinesForBracesInTypes": false,
   "NewLinesForBracesInMethods": false,
   "NewLinesForBracesInProperties": false,
   "NewLinesForBracesInAccessors": false,
   "NewLinesForBracesInAnonymousMethods": false,
   "NewLinesForBracesInControlBlocks": false,
   "NewLinesForBracesInAnonymousTypes": false,
   "NewLinesForBracesInObjectCollectionArrayInitializers": false,
   "NewLinesForBracesInLambdaExpressionBody": false,

   "NewLineForElse": false,
   "NewLineForCatch": false,
   "NewLineForFinally": false,
   "NewLineForMembersInObjectInit": false,
   "NewLineForMembersInAnonymousTypes": false,
   "NewLineForClausesInQuery": false
}
}
0

There are 0 best solutions below