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

Command to format selection #558

Open
SullivanMuse opened this issue Mar 3, 2025 · 3 comments
Open

Command to format selection #558

SullivanMuse opened this issue Mar 3, 2025 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Issue is not triaged.

Comments

@SullivanMuse
Copy link

It would be nice if this extension supported formatted only selected code as I often want to maintain a minimal diff while still formatting code I have added.

@github-actions github-actions bot added the triage-needed Issue is not triaged. label Mar 3, 2025
@karthiknadig
Copy link
Member

@SullivanMuse We support features that black supports. In this case we do support formatting selected lines, since black has --line-ranges option. Is this what you were looking for?

@karthiknadig karthiknadig self-assigned this Mar 4, 2025
@karthiknadig karthiknadig added info-needed Issue requires more information from poster feature-request Request for new features or functionality labels Mar 4, 2025
@SullivanMuse
Copy link
Author

@SullivanMuse We support features that black supports. In this case we do support formatting selected lines, since black has --line-ranges option. Is this what you were looking for?

How does one invoke the extension to format selected lines?

@karthiknadig
Copy link
Member

I think there is a shortcut for it:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Issue is not triaged.
Projects
None yet
Development

No branches or pull requests

2 participants