I want an indented newline after typing opening bracket and pressing Enter in VSCode.
Here’s an example where | is the cursor:
Current behaviour-
function f() {
|}
Behaviour wanted-
function f() {
|
}
The behaviour I want is the default one, but I don’t know what happened and it doesn’t work like that now. I couldn’t find a solution to it, so I’m asking here. Thanks in advance
2
Answers
Finally, I found the issue. In settings.json somehow I had this included.
But by default it's not there, or rather this is the default setting:
TLDR: Just remove it.
Just press enter, if that didn’t work try to set settings into default or check if it is a part of an abbreviation