I'm not sure if my title is entire accurate, however, I would like to disable the feature in ReSharper formatting where it removes spaces upon formatting. The following image describes the behaviour (red = before format, green = after format)
As you can see the spaces before id
and after fileId
are removed, so:
new { id = fileId }
-->
new {id = fileId}
I would like to disable this behaviour, and actually (if possible) enforce the leading and trailing space. I can't find what the option is called in the ReSharper -> Options -> C# -> Formatting Style -> Spaces tab.
Any help would be greatly appreciated
You can keep the spacing with the option:
Within single-line initializer braces
.It can be found here: Resharper -> Options -> Code editing -> C# -> Formatting Style -> Spaces