我希望 VS Code 在 C# 和 C++ 中将花括号放在新行上
How it works now
How it should look
尝试了 C# FixFormat 扩展,但只有在按下 CTRL+K+F 后它才起作用
但我希望 VS Code 在我编码时在新行上加上大括号,
无需额外的步骤,如热键等
现在 C#FixFormat 已被删除,请尝试添加omnisharp.json
文件包含以下内容在项目的根目录中。
{
"FormattingOptions": {
"NewLinesForBracesInLambdaExpressionBody": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInTypes": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
"NewLinesForBracesInAccessors": false,
"NewLineForElse": false,
"NewLineForCatch": false,
"NewLineForFinally": false
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)