Hi I'm using VS Code for TypeScript and JavaScript. Standart autoformat create code like this
if(ind){
// code
}
but I don't like this :), how to set autoformat as
if(ind)
{
// code
}
Hi I'm using VS Code for TypeScript and JavaScript. Standart autoformat create code like this
if(ind){
// code
}
but I don't like this :), how to set autoformat as
if(ind)
{
// code
}
This is currently not possible with VsCode, but there is an issue tracking the problem and here's the actual code fix.
Keep in mind that this is from the development branch, so the behavior and settings may change, but I believe the settings you will want are:
javascript.format.placeOpenBraceOnNewLineForControlBlocks
and/orjavascript.format.placeOpenBraceOnNewLineForFunctions
This feature should make it into an official release shortly, but if you want the try out bleeding edge features you can always build VsCode from the source.
for
TypeScript
insettings.json
and autoformat!