-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Range formatting #7233
Comments
Thats cool, not just one range, but batch range formatting. |
Oh, I didn't know about that. We'll start with one range but being aware of multi range formatting may help us to decide on the design |
do you know what's the use case for this from the editor side? |
I assume it's to speed up "Format changed code" when saving a file with multiple non-overlapping changed ranges. |
For example, VSCode's format selection command. i use it most of the time instead of formatting the entire document. |
Current state (only very basic statement range formatting): https://github.com/astral-sh/ruff/tree/range-formatting |
FYI, this capability has recently been added to Black (psf/black#4020). |
Addition to the Currently, Ruff doesn't format the document automatically even if format on save is enabled if |
For IDE integration, it would be great if it was possible to select a certain range of code and only format that range.
The text was updated successfully, but these errors were encountered: