-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Splitting previously split lines on logical separators if available #924
Labels
Milestone
Comments
From my testing, it seems like a difference of just two characters can result in the 3 formats below, regardless of the indentation level. I am on board with trying to eliminate the second option. I may actually have an issue about this already.
|
belav
added
type:enhancement
New feature or request
area:formatting
priority:medium
labels
Aug 11, 2023
belav
added a commit
that referenced
this issue
Aug 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Splitting lines not solely on the width but also on width + logical separators makes the code more readable (subjectively).
Example
Example code with logical checks, just exceeding a 100-character config limit.
Original Line, 103 char long. Over the 100-char config limit.
When formatted ends up like the following, 97 char long at the widest, under the 100-char config limit.
In my opinion, this would look better by either keeping it at 103 and not breaking or, preferably, breaking it further like so:
Currently, the last example will be formatted back to the middle example.
The text was updated successfully, but these errors were encountered: