ReSharper fluent indentation

2019-08-03 12:52发布

问题:

When I format this piece with ReSharper:

this.Tabs.Add(bb => bb
             .Horizontal(h => h
                  .Vertical(v => v
                      .Box("0", upperView, "")
                      .Box("1", mainView, ""))));

I get:

this.Tabs.Add(bb => bb
                     .Horizontal(h => h
                                           .Vertical(v => v
                                                             .Box("0", upperView, "")
                                                             .Box("1", mainView, ""))));

But I want it to stay the same. How would I do this?

回答1:

Maybe deselecting

  • ReSharper →
  • Options →
  • Languages →
  • C# →
  • Formatting Style →
  • Other →
  • Align Multiline Constructs →
  • Expression

reduces the effect.

(Assumed you are using C#.)