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

autoimport e.g. from os import * #1866

Closed
SebastianBolte opened this issue Jul 7, 2022 · 1 comment
Closed

autoimport e.g. from os import * #1866

SebastianBolte opened this issue Jul 7, 2022 · 1 comment

Comments

@SebastianBolte
Copy link

SebastianBolte commented Jul 7, 2022

I know that this feature will not be implemented in the near future(davidhalter/jedi-vim#736 (comment)) but maybe you can tell me here also where I have to adapt the jedi - code. May be you know a really fast solution which is more like a hack but what I can use local for my requirements?

@davidhalter
Copy link
Owner

The thing is that there is not really a fast solution, otherwise I would already have done it :). The problem is really that the whole architecture was never really done for problems like this one. There is no name binding procedure and there's also no form of caching (because there's no good invalidation for type inference). You could potentially just iterate over all names in a file and use goto on the right ones and then search for definitions in other files. But that's reallly hacky. The Rust code that I'm currently writing has a different architecture and with that it should be easily possible to implement auto imports.

I think #1059 is pretty much the reason why this is not possible. Closing this one, because there's nothing to do here for now.

Feel free to continue discussing this though.

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

2 participants