-
Notifications
You must be signed in to change notification settings - Fork 13
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
Strange formatting of long show-set rule #143
Comments
I'm not entirely sure what's happending but it looks like this falls into a special handling for single parameter function call. I will look into it later. |
In the current implementation, as long as the call/set has exactly one arg which is not func-call, we will force that arg to stick with the paren. Without this rule, the code will be formatted as you suggested. |
Now it's 7 lines instead of 3. Isn't this too much? It's really unnecessary stretched, considering that there is a lot of room on the right. Which line limit is used for tests? |
you are seeing the 0 width snapshot. typstyle will break at every possible position in case. this is only for debugging. for real world use case, please see -80 and -120 snapshots. |
Oh, I didn't notice that there are multiple tests for the same thing. All good. |
with
typstyle -c 80
:I think it's much more readable to prefer first breaking by 1 parameter per line:
The text was updated successfully, but these errors were encountered: