'Visual studio 2022 / Resharper indents element after new line
I have some code in visual studio that looks like this:
if I place my cursor at the end of the div with class "row" and press enter, that whole div loses its indentation and goes to start like this:
It has been driving me mad because I can't figure out what does it nor how to stop it. I have visual studio 2022 and I also have Resharper installed.
I'm fairly confident it has something to do with resharper, I just can't figure out what. If I disable resharper then this problem goes away. Resharper is updated to latest version.
Solution 1:[1]
Only solution I came up with was to turn off auto-formatting after pressing Enter (for Razor files).
(untick Resharper -> Options -> Behaviour -> Razor -> Auto-format on Enter)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | wbsth |