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

Option for configuring line length? #32

Open
yhcharles opened this issue Oct 30, 2022 · 2 comments
Open

Option for configuring line length? #32

yhcharles opened this issue Oct 30, 2022 · 2 comments

Comments

@yhcharles
Copy link

For black, we can set the line length in "Python > Formatting: Black Args". Is it possible to have something similar for ufmt?
Thanks!

@amyreese
Copy link
Member

amyreese commented Nov 1, 2022

This is a bit tricky given the way the extension is implemented. Is there a reason that you don't define your preferred line length in a pyproject.toml, where it can be read and obeyed by ufmt/black, regardless of whether it's running from VS Code or CLI?

@yhcharles
Copy link
Author

Thank you for your reply! I really like ufmt, and I use it as my default Python formatter.
So it runs for my ad-hoc script as well. And in this case, usually it's not in a project, and there's no pyproject.toml.
Not sure if it's possible to generate some global config pyproject.toml, and put it in ~/.vscode/ for example. Then use it as the "default" config?

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

No branches or pull requests

2 participants