-
Notifications
You must be signed in to change notification settings - Fork 890
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
Yapf is not found as a formatter in vscode #1125
Comments
The option "python.formatting.provider" is provided by Python extension as it calls yapf for formatting hence you should select "Python" as your formatter. |
That means are they planning to release a vscode extension for it? It seems to work and select the correct formatter, though. Thank you! |
See the community extension https://marketplace.visualstudio.com/items?itemName=eeyore.yapf |
@bwendling this may be closed as resolved by https://marketplace.visualstudio.com/items?itemName=eeyore.yapf and #1135 |
I installed yapf in my virtual environment (Windows 11 + WSL2 with Ubuntu 20.04.6 LTS) using
and it runs smoothly.
According to docs I read online, I needed to add in the
settings.json
file for the workspace the line:Note that whenever I try to modify the value of such a key, "yapf" is actually suggested as one of the options.
However, when running the command to format the document, it prompts that the default value for the formatter is
black
, but the latter cannot be found since I have uninstalled it.I am suggested, then, to choose another one for my Workspace, and I would like it to be
yapf
, but it is not shown in the options I have.Note that running in the shell, with the virtual environment activated that is the same one of the Python interpreter selected, yapf formats the file like a charm.
Any hints on how to make VSCode find yapf?
The text was updated successfully, but these errors were encountered: