使用最新的Omnisharp(dev分支)和与我的项目的.sln
文件在同一文件夹中的omnisharp.json
(下面粘贴)后,我终于让它工作了。自从v1.9-beta18以来,它应该适用于所有发布版本,我只是因为不使用受支持的系统而从源代码编译了它。
{
"FormattingOptions": {
"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,
}
}
可用属性列于
FormattingOptions.cs
在
omnisharp-roslyn
存储库中列出。