2
With a problem in auto-indentation of Vscode, I have tried to disable even then the problem remains. When saving a file Vscode automatically changes the indentation, follows the image before saving and after saving:
2
With a problem in auto-indentation of Vscode, I have tried to disable even then the problem remains. When saving a file Vscode automatically changes the indentation, follows the image before saving and after saving:
1
Guy talked in the comments this is not the standard behavior of VS Code
, which leads us to believe strongly that it was Extensão
, probably one that has code formatting options, which you installed and defaced the indentation.
Apparently the extension JS-CSS-HTML Formatter
that bugged your environment. According to her documentation she uses internally the formatting of js-beautify
https://marketplace.visualstudio.com/items?itemName=lonefy.vscode-JS-CSS-HTML-formatter
You can change the setting
not to change anymore when saving "onSave": false,
In the latter case you can simply uninstall this extension and install another that does not have auto-format while saving
-1
I had to uninstall the JS-CSS-HTML Formatter extension in order to get it back to work. It seems to be bugged. I installed another.
-2
The same thing happened to me and it was the HTML extension CSS Support - CSS Intellisense. I disabled and ready, back to normal.
Browser other questions tagged javascript react visual-studio-code indentation
You are not signed in. Login or sign up in order to post.
Face the first step is to disable all extensions you have installed to see if it solves...
– hugocsl
It worked friend, I disabled all the extensions and I was enabling and testing one by one, the one that was changing the indentation was JS-CSS-HTML Formatter, I believe I did not know how to configure it correctly. I left it disabled and now it’s 100%, thank you very much!
– Meydson Baracho
No problem my dear! If you allow me I can post as answer? Ai you can tag it and leave your question with a accepted answer, so it does not stay on the site as a pending answer etc
– hugocsl
Yes friend!!
– Meydson Baracho
It’s worth the strength Meydson, if the answer suits you you can consider mark it with accepted in the icon below the arrows next to the answer ;)
– hugocsl
of course my friend, you don’t know how much you helped me, I was spending a lot of time analyzing the code when I bugged!!! Thank you very much!!!!
– Meydson Baracho