Code:
const a = {a: 'b'};
Then format it:
const a = { a: 'b' };
Does vscode support removing spaces after opening and before closing curly braces now?
Updated answer for newer vscode version
As of VSCode 1.13, you can disable the automatic space insertion by setting:
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false
or
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false
Original answer
I work on JavaScript and TypeScript support for VSCode.
As of VSCode 1.9, we do not expose a setting for formatting spaces after and before curly braces. Support for this is being tracked here and we'll pick up this formatting option once TypeScript exposes support for it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With