Giter Site home page Giter Site logo

Comments (3)

janwijbrand avatar janwijbrand commented on August 28, 2024

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.

EeyoreLee avatar EeyoreLee commented on August 28, 2024

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 version 0.1.10.

Editor suggestions for an "[xml]" section:

autosuggest-default-formatter-1 Editor suggestions for an `"[python]"` section: autosuggest-default-formatter-2

@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.

janwijbrand avatar janwijbrand commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.