-
Notifications
You must be signed in to change notification settings - Fork 21
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 wrapping on heavily indented text #6
Comments
Yes, this is expected behaviour at the moment, as the formatter alternates between wrapping and indenting as you suggest. I am hoping to restructure this to remove the multiple passes framework at some point. |
A potential band-aid fix to this could be for line wrapping to not count the initial indent as characters, this would mean that the text starts going past 80 characters but the line width should be bounded by your indent level |
Yes this is possible but I would really like the formatter to adhere to 80 characters whenever it can. I'll think about this more. |
I am working on a solution as part of a refactor in the
This way, after the line is re-indented, it will most likely not need wrapping again. Thus
is formatted to
The last line is slightly longer than the others, but I think this is better. |
Implemented in 9589405. Let me know if this is still not desirable and I can reopen the issue. |
The following (with the text being all on the same line):
is formatted to:
I think the formatter is doing a wrapping pass followed by an indentation pass followed by another wrapping pass?
The text was updated successfully, but these errors were encountered: