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
Consider reversing the "wrap by default" behaviour #1314
Comments
i simple replace all spaces with |
One way to accomplish the same result could be to add an option to KotlinPoet that would enable or disable this behaviour. |
I'll copy my comment from another issue I just closed as a duplicate of this one:
|
I agree that wrapping by default should either be completely disabled, or this should be an option for the user (e.g. as an argument to |
Treating all spaces as wrapping by default leads to shorter lines and better formatting overall, but in certain cases can break compilation (there's a large number of issues mentioning this problem). Using
·
addresses the problem, but it's not ergonomic:·
can't be typed on the keyboard, so it has to be copy-pasted from the docs.·
feels like extra effort just to get the library to function properly, which breaks the rule of applying the least amount of effort to get correct results.We used to have
%W
as a "wrapping space" format modifier prior to 1.0, which could be used optionally to improve the formatting of generated code. I suggest that we revert to something like this in 2.0.The text was updated successfully, but these errors were encountered: