-
Notifications
You must be signed in to change notification settings - Fork 926
Separate use_small_heuristics into distinct options #3710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe that the width limits internally set based on the value of Some related issues:
Is the plan for this one to re-introduce the more granular width config options ( |
@calebcartwright Thank you for picking this up.
Yes.
The value of |
Thanks @topecongiro. Just to validate my understanding, are the below scenarios & behaviors correct?
use_small_heuristics = "Default"
max_width = 100
fn_call_width = 80
|
@calebcartwright Yes to every question 👍 I almost want to remove the |
👍 I definitely feel like there's an opportunity here, as My sense is that there's two separate use cases that are tricky to support simultaneously which is why there's complexity and some ambiguity around
If we remove Alternatively, if we keep I can start working on making the more granular configs public, but let me know how you'd like to proceed with the potential removal of |
I'd be content with an override situation where if you're providing the fine grain widths, it overrides the defaults set with use_small_heuristics. This way you can ease your way into it. Otherwise, in the documentation, providing what the equivalent width settings to match use_small_heuristics output would be fine. |
The default value of If we don't want to change the default formatting, then we can either add additional options besides (Default, Off, and Max) which probably makes sense as both "Off" and "Max" are very extreme. For example "medium" and "high". Alternatively we simply allow struct_lit_width to be overridden as a separate parameter. |
@tkaitchuck - All of the individual width config options are going to be made public (including The only remaining question is whether we'll also keep |
Feature request
Small heuristics has a mix of formatting cases that I like and dislike. Unfortunately, I can't have the mix of formatting options I want since it's an all or nothing sort of situation with
use_small_heuristics
. This issue is a feature request to separate out those formatting options into distinct options.For backwards compatibility, I imagine it would be reasonable to annotate them as "overridden if
use_small_heuristics
is not 'off'"Example situation
It's a small heuristic feature to format structural enums on the same line:
But if I disagree with some of the other small heuristics, I can't have this formatting option at all if I chose to set the configuration option to
"off"
.The text was updated successfully, but these errors were encountered: