David C
David C

Reputation: 979

How do I stop VSCode auto formatting from deleting spaces inside parentheses?

for example, when I write

foo( bar ){}  

it will be formatted to

foo(bar){}  

how do I make it keep the 2 spaces?

Edit:
This is a different question from How to change indentation in Visual Studio Code?

Upvotes: 4

Views: 1157

Answers (1)

David C
David C

Reputation: 979

Putting

 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true

in the settings json solved the problem.

Upvotes: 4

Related Questions