You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[rustfmt::skip] is used whenever we want rustfmt to not mess up the formatting.
But quite a few times I see this it is for tables / vecs in vecs where we are after padding so that things line up vertically so that the line by line differences are minimised and we can clearly see the differences.
Tabs help but maintaing tables manually is time consuming.
I think an opt in hint to format the item giving preference to vertical similarity would be really cool. I appreciate it's probably hard to do in general but I am sure there are some 80/20 cases that could give us most of the benefit.
Or is there already such a thing and I just didn't know about it?
The text was updated successfully, but these errors were encountered:
However, note that indent_style gets applied consistently, not just to one or two macros. Beyond that there's not anything else that comes to mind, nor really much more we can do. Many times in these cases folks want to have (from a rustfmt/AST POV) an arbitrary number of elements per row sometimes with their own internal padding (somewhat like multiple central aligned columns within) and I just don't see it being feasible for rustfmt to attempt to do something like that.
Would certainly be happy to review a PR if someone proves me wrong and comes up with a relatively clean implementation, but I don't see the rustfmt team ever getting around to working on this ourselves.
#[rustfmt::skip]
is used whenever we want rustfmt to not mess up the formatting.But quite a few times I see this it is for tables / vecs in vecs where we are after padding so that things line up vertically so that the line by line differences are minimised and we can clearly see the differences.
Tabs help but maintaing tables manually is time consuming.
I think an opt in hint to format the item giving preference to vertical similarity would be really cool. I appreciate it's probably hard to do in general but I am sure there are some 80/20 cases that could give us most of the benefit.
Or is there already such a thing and I just didn't know about it?
The text was updated successfully, but these errors were encountered: