When I open the curly brackets in CSS and hit enter, it just jumps to the next line like this:
body {
}
It doesn’t add a new line with an indentation like it used to, I tried looking through the setting and trying everything but couldn’t get a result.
I want it to look like this when I press Enter:
body {
}
3
Answers
To anyone who is facing this problem in VSCode. This feature is not related to any extension, not Prettier or any other extension. What you have to do to fix this bug is:
It adds that indentation in both HTML and CSS
What you need is a VSCode plugin called "Prettier".
It can be downloaded in the "Extensions" section of VSCode,
or downloaded from this link: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
You can try the following:
a) off
b) afterDelay
c) onFocusChange
d) onWindowChange