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

Feature request: Auto-suggest to add missing import #126

Closed
karthiknadig opened this issue Apr 6, 2021 · 5 comments
Closed

Feature request: Auto-suggest to add missing import #126

karthiknadig opened this issue Apr 6, 2021 · 5 comments

Comments

@karthiknadig
Copy link
Contributor

Provide a code action to add missing import.

@pappasam
Copy link
Owner

pappasam commented Apr 7, 2021

Unfortunately, this feature is neither supported by Jedi at the present nor will it be supported in the near future (per @davidhalter 's comment on Dec 26, 2020). Please see: davidhalter/jedi-vim#736 (comment) . If it's super important, we can look into submitting a PR, but I'm guessing David hasn't found a way to provide the feature in an accurate, performant way, and he knows the Jedi codebase better than most humans.

@davidhalter
Copy link

davidhalter commented Apr 7, 2021

Yeah, I'm sorry but this won't happen at least in the near future. Jedi's architecture is just not built for this...

I guess someone could built this theoretically in a manner similar to searching references, but it will just be pretty slow probably and I don't think that building a slow version of this is a good idea...

@krassowski
Copy link
Contributor

FYI, there is this: palantir/python-language-server#685

@karthiknadig
Copy link
Contributor Author

I can understand that this might be something that will take a long time. We can close this for now, and revisit this some time in the future.

@dmerejkowsky
Copy link
Contributor

There is also rope

I successfully implemented "add imports" and a few other actions using rope for kakoune. See https://git.sr.ht/~dmerej/kak-rope

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

5 participants