Giter VIP home page Giter VIP logo

Comments (5)

fannheyward avatar fannheyward commented on June 15, 2024 6

Set "python.analysis.diagnosticMode": "workspace" in your coc-settings.json, you will get auto-import suggestions.

from coc-pyright.

xulongwu4 avatar xulongwu4 commented on June 15, 2024

For anyone coming to this issue, I found a very good illustration of the auto-import behavior in vscode. Some very relevant discussions are here.

from coc-pyright.

roblevy avatar roblevy commented on June 15, 2024

I still don't know how to use the auto-import feature, after watching the gif and reading the discussion you posted. Is it actually possible to get auto-import?

from coc-pyright.

jeanlucthumm avatar jeanlucthumm commented on June 15, 2024

Can we reopen this

from coc-pyright.

davidonlaptop avatar davidonlaptop commented on June 15, 2024

YMMV but it seems that the default indexing isn't deep enough for auto-import to work when the function or class you import is not at the root level, so here's what I had to put in my settings.json for it to work properly:

{
  "python.analysis.autoImportCompletions": true,
  "python.analysis.indexing": true,
  "python.analysis.packageIndexDepths": [
    {
      "name": "",
      "depth": 3
    },
    
    ]
}

from coc-pyright.

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.