-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Indentation of pretty-printed blocks is terrible #904
Comments
Same for other function expressions, actually. Unfortunately, the current pretty-printer isn't really suited for 'javascript-style' indentation. |
Does the "better" notation of foo() { | ... | } prints less horribly? |
I haven't tried. But even if it does, blocks-within-parenthesis are a part of the language and should be handled in a moderately elegant way. |
Block syntax is different now. It still doesn't pretty-print that nicely, but it is broken in different ways. |
The implementation is the same (where possible), and it unblocks rust-lang#904 Signed-off-by: Joe Richey <[email protected]>
* use message-format plain, update error handling
It indents the body deeper than the opening brace, and runs off the right margin. I think something like this would preferable:
The text was updated successfully, but these errors were encountered: