-
Notifications
You must be signed in to change notification settings - Fork 194
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
[line breaks, wraps] Multiline parameter break tuning #33
Comments
This look like a case that deferred to the wrap-optimizer, which is currently subject to zero-effort penalty tuning. We should be able to achieve the form you desire with better penalty values. Will categorize as such. How amenable would you be to:
or
|
So your first example would basically correspond to the "long list style" in #32, right? I am actually fine with both styles that you suggested. is it possible to support both of them? I.e. variant 1) for long lists and 2) for short ones? or should we distinguish the two cases by adding inline |
b/145161192 |
Given a left and right token, and their respective contexts (stacks), the new factor is computed: (let a, b, c,... be syntax tree node enums) left : [a, b, c, d, e, f, g, h] right: [a, b, c, d, p, q, r, s, t] The common ancestry C is 4. The penalty factor is scaled linearly: C * k (currently, k=2) This attempts to very quickly give not-horrible results when wrapping long and deep structures. This will serve as a baseline for subsequent penalty tunings. issues #30, #33, #36 PiperOrigin-RevId: 293466087
should:
is:
Note that this "compact" enumeration style is different than from the "long list style" mentioned in #32
The text was updated successfully, but these errors were encountered: