Skip to content
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

[WIP] Add new formatter that can do better pretty-printing #7011

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

joshuawarner32
Copy link
Collaborator

Instead of trying to do formatting all in one go, instead build up an efficient tree structure first and only after that decide where to place newlines/etc.
Notably, this let's us use relatively simple/clean heuristics for removing newlines as long as the overal visual line length remains manageable.
It also removes the need for separate is_multiline/format code, where the former has to infer what the latter will do.

Highly WIP! Not ready for merging!

@kdziamura
Copy link
Collaborator

Related issue: #6903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants