belav / csharpier

CSharpier is an opinionated code formatter for c#.
https://csharpier.com
MIT License
1.43k stars 99 forks source link

Collection expressions are prefixed with 2 spaces when using object initialisation syntax #1049

Closed JoshWoodArup closed 1 year ago

JoshWoodArup commented 1 year ago

Similar to #1009, collection literals are prefixed with 2 spaces when using object initialiser syntax. For example:

var a = new A { B = [1, 2, 3] };

is formatted as:

var a = new A { B =  [1, 2, 3] };