Comments (3)
Quick followup: after installing the autopep8 extension the "editor.defaultFormatter"
is suggested. As if "eeyore.yapf" is not recognized by VSCode as a valid formatter.
from vscode-extension-yapf.
Hi, I'm trying to get this extension to work. I've added the following lines to my
settings.json
:"python.formatting.provider": "none", "[python]": { "editor.wordBasedSuggestions": false, "editor.defaultFormatter": "eeyore.yapf" }
But whenever I try to use the "format document" command, VSCode shows a dialog "There is no formatter for 'Python' files installed". Interestingly, VSCode tries to help with configuration suggestions when one is editing
settings.json
. There's no suggestion inside a"[python]"
section though for"editor.defaultFormatter"
, where it does suggest this configuration key in, for example, in an"[xml]"
section. See screenshots.VSCode version
1.84.2
. eeyore.yapf version0.1.10
.Editor suggestions for an
Editor suggestions for an `"[python]"` section:"[xml]"
section:
@janwijbrand - maybe cause the wave line "editor.defaultFormatter"
is already exist. this property has nothing to do with formatter extension. the value of "editor.defaultFormatter"
is indeed registered by formatter extension. And the crash maybe cause the wrong python interpreter. Could you try to select a python interpreter that python3.8 or greater by ms-python extension. if it still not works, please show the output of yapf channel.
from vscode-extension-yapf.
Thanks for you reply. And you are probably correct: the python that is picked up from the VSCode environment cannot start the bundled lsp code. The error output of the extension pointed me there now. I understand why now.
from vscode-extension-yapf.
Related Issues (20)
- yapf: input filenames did not match any python files - No formatting done. HOT 2
- Format Selection is formatting the entire file HOT 5
- "ALLOW_MULTILINE_DICTIONARY_KEYS" flag no longer working HOT 1
- Something has gone awry with extension installed on Remote HOT 1
- [Feature Request] I hope to add a command to generate a yapf configuration file. HOT 1
- Newline is added to empty files causing PEP8 warning W391 HOT 4
- Path to .style.yapf HOT 5
- Yapf formatter with devcontainers not sticking HOT 3
- Range Formatting HOT 6
- Trailing empty line added to end of file / notebook cell HOT 4
- Python 3.7 is not supported HOT 2
- Formatting will be break for jupyter on `FormatOnType` mode if there are some magic function
- The "yapf" extension is configured to format programs, but not "Python"-files. HOT 6
- Cannot start server HOT 3
- Cannot handle new 3.12 f-strings, hangs up completely HOT 6
- Formatter is constantly formatting HOT 5
- The new version format: {year}.{month}.1{day}{hour}{minute}{second} HOT 1
- Yapf formatting on type instead of on save HOT 4
- SyntaxError for a Python 3.7 conda environment HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-extension-yapf.