7

I'm struggling with Resharpers formatting. Consider the following Code:

product.Resources.Where(x => x.Tracked).Pipe(y =>
                                             {
                                                 //Action       
                                             });

How can I tell ReSharper to indent the part in the curly braces and the curly braces itself only a little bit? I've tried several Resharper formatting settings but none had any effect in this case.

Edit:

I would like to have a format similar to this:

product.Resources.Where(x => x.Tracked).Pipe(y =>
    {
        //Action       
    });
Jay
  • 2,141
  • 6
  • 26
  • 37

1 Answers1

5

See https://stackoverflow.com/a/819393/736079

You can customize ReSharper to do just that, you'll need to do the following (All in ReSharper -> Options -> C# -> Formatting Style):

  • In Braces Layout, set Array and object initializer to At Next line (BSD Style).
  • In Other, make sure that Continuous line indent multiplier is set to 1.
  • In Other, make sure that Indent array, object and collection initializer block is unchecked.

You should get the style you want.

Community
  • 1
  • 1
jessehouwing
  • 106,458
  • 22
  • 256
  • 341