[SOLVED] save without auto formatting in vscode

does anyone know how to save codes in vscode without auto formatting.
It is really annoying and i couldn’t find the working solution online.

Are you using any formatting extensions like Prettier?
Check in the setting of such extensions it has the option to disable formatting on save.

If not then disable VS Code’s default behavior of format on save like the screenshot below.

because who would want to have badly formatted code? badly or “custom” formatted code should be forbidden and punished by death penalty

Well Not Really,

I’ve developed a VueJS Application which was causing problems with my linter based on the usage of singe quotes ' or double quotes ". Whenever saving the .vue file my prettier extension was changing all my single quotes to double quotes as basic javascript expects it to but it was breaking my vue template. Hence i had to disable it. This is just one use case others may have their own. So i agree with you that custom formatting shouldn’t be allowed but developers should also have control on how their IDE should work.

ok that makes more sense; i dont work/know well with lint so i didnt think it could give you trouble for such small details. but if its about some “super cool custom formatting” then to the guillotine.

It is disabled and i am not using any extension to beautify my code. It’s just… Whenever i save my code vscode automatically add some braces around return statements . I mean who put braces around one line return statements :pensive:

What programming language?

What are the other extensions installed for that language?

I hope this is what you meant?

3 Likes