Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does vscode support removing spaces after opening and before closing curly braces now?

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?

like image 523
leaves Avatar asked Feb 06 '17 07:02

leaves


1 Answers

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

like image 80
Matt Bierner Avatar answered Nov 16 '22 00:11

Matt Bierner