✅ How do I disable auto formatting in vscode?
i'm preetty sure this is c# dev kit because after i disable the extension, the auto formatting disappears. i can't find the setting that disables this behavior
17 Replies
seems like uninstalling the c# dev kit extension and downgrading the c# extension helps
you can definitely disable it
try asking gpt or something
theyre good at that
Why would you not want your code to be made more correct for free?
You should keep this. This is the correct style to use.
If you seriously feel the need to change the style to your requirements, add an
.editorconfig
file instead and customize the settings there.
You can just as well disable formatOnSave. Or any other combination of settings that absolutely do not require you to disable or downgrade extensions.because i don't like allman
I hate to tell you this, but it's the convention in C#. You should bite the bullet and get used to it. Any C# developer reading your code (which includes asking for help here) will be thankful for sticking to the convention and not having to adjust how they read C# code just for one individual
But like I said. You can configure this via an
.editorconfig
file: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#new-line-optionsi tried it and it had no effect
Then you simply made a mistake, sorry
I use exclusively vscode and it respects the editorconfig just fine
does it respect those settings you sent?
Of course
which versions of the extensions are you using?
The latest
ok i will actually try it again and let you know
Don't forget to actually show your files and their contents if it doesn't work, nobody can help otherwise
thanks! it worked
turns out i forgot the
[*.cs]
when i first tried itI just want to reiterate again to please reconsider and simply stick to the conventions set forth by the language. It's much better to stick to the language's style everywhere instead of your own style everywhere. You always need to have readers and contributors in mind.
Other than that, $close
If you have no further questions, please use /close to mark the forum thread as answered