I have found other duplicates of this question, but they are very old and the solutions are not applicable to R#8, because the settings have changed.
When I do anonymous type or object initialization (any kind of curly brace indentation with content), I want it to be BSD style:
var test = new CustomType
{
Prop1 = value1,
Prop2 = value2,
};
...and I set R# Options / Code Editing / C# / Formatting Style / Braces Layout / Array and object initializer to "At next line (BSD style)". However, when I hit enter after adding a new curly brace, I still end up with this:
var test = new CustomType
{
Prop1 = value1,
Prop2 = value2,
};
...which I believe is Whitesmiths style.
What do I need to do to get R# 8 to not indent braces for initializers?
There are two settings that together govern this:
Update from OP
These settings may have to be set for "This Computer", not just for personal or team-shared options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With