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
pubstructStructures{/// Align fields of user defined structures to a threshold.pubfield_alignment:FieldAlignment,/// Put small struct literals on a single line.pubstruct_lit_single_line:bool,}pubenumFieldAlignment{AlignFields(usize),Off,}
This would reduce the clutter in Config, remove the need for extra constants and take away the need for the user to input the same number for each type of alignment.
The text was updated successfully, but these errors were encountered:
Hmm, that looks good but in doing so wouldn't we block people from selecting which type to align (with different thresholds)? For example, would there be a case where a user wants to align enums and structs but not storage fields?
One thing mentioned before is that we don't want to make swayfmt "fully customizable" like rustfmt. I don't really see a user in the future that would want one aligned but not the other, but if those users do arise it's an easy fix. In the mean time it makes the use case much clearer and cleaner in the code itself.
This could look like:
This would reduce the clutter in
Config
, remove the need for extra constants and take away the need for the user to input the same number for each type of alignment.The text was updated successfully, but these errors were encountered: