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

feat: add darker #80

Merged
merged 3 commits into from
Sep 29, 2023
Merged

feat: add darker #80

merged 3 commits into from
Sep 29, 2023

Conversation

okuuva
Copy link
Contributor

@okuuva okuuva commented Sep 27, 2023

darker runs black only on the changed lines in a git repo. Useful in situations where the whole repo hasn't been painted black for one reason or another but you still want to be able to run autoformatter on changes you made.

lua/conform/formatters/darker.lua Outdated Show resolved Hide resolved
Added --no-color since we don't want color output. Also set --revision
and --stdin-filename since running darker for a single file doesn't make
much sense without them.
If the buffer is modified we should set revision and stdin-filename in
order not to lose changes. If it's not we should leave them unset so
that we respect settings from pyproject.toml.
@stevearc
Copy link
Owner

Thanks for the PR!

@stevearc stevearc merged commit e359687 into stevearc:master Sep 29, 2023
7 checks passed
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