如何阻止VSCode自动格式化删除括号内的空格?

时间:2018-11-23 05:38:06

标签: visual-studio-code vscode-settings

例如,当我写

foo( bar ){}  

它将被格式化为

foo(bar){}  

我如何使其保留2个空格?

编辑:
这是与How to change indentation in Visual Studio Code?

不同的问题

1 个答案:

答案 0 :(得分:0)

放入

 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true

通过设置json解决了问题。

相关问题