0

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
}
}
Yunnosch
  • 26,130
  • 9
  • 42
  • 54
  • Please avoid multilanguage questions, they tend to grow inconsistent. – Yunnosch Aug 20 '23 at 17:10
  • I think you might want to read https://stackoverflow.com/q/76850403/11107541 (especially the part about `dotnet.server.useOmnisharp`) – starball Aug 20 '23 at 19:45

0 Answers0