How to set up formatting to align multi-line method chains
I'd swear this was working at some point, but I seem to have tweaked my C# formatting settings once too many times, and I can't figure out how to get it back.
I just want a multi-line method chain to line up the dots. Currently, all I can do is:
Dictionary<string, List<string>> dict = items.Select(i => i.Property)
.Where(c => c.State == "Foo")
.ToDictionary(t => t.ItemId);
When what I'd like is:
Dictionary<string, List<string>> dict = items.Select(i => i.Property)
.Where(c => c.State == "Foo")
.ToDictionary(t => t.ItemId);
Any advice on how to set this up would be appreciated.
Note: this is using 5.1.2 EAP Build 1758
Please sign in to leave a comment.
Hello Rob,
Actually there's no code style option to control the formatting of chained
method calls. There's an issue in our tracker: http://youtrack.jetbrains.net/issue/RSRP-88220
and you're welcome to monitor its status. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Maybe you had something similar to below?




E.g. with default settings "Call arguments" and "Expression" checked (tab size 4):
With "Expression" unchecked:
With both "Expression" and "Call arguments" unchecked: