Let's say I have this code in .jsx file:
Now if I type, for example, BrowserRouter
and hit Tab I got this state which is still ok:
But now when I hit Enter, I have this state:
How do I make it work like in .html
files that pressing Enter adds two new lines and makes auto indentation? Like that:
I have VS Code v1.20.1 and my preferences which could be related to this issue are as follows:
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
}
I've searched through Github issues of VS Code and seems like it was fixed about half a year ago and should work now, but for some reason it's not. Also I've run VS Code with --disable-extensions
flag for this so it's not an extension problem.
I've also found that it seems not to work for top-level tag only. For anything inside it the indentation works like in .html
files. Strange.
Thank you.