-
Notifications
You must be signed in to change notification settings - Fork 161
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 imports if already imported #194
Comments
I'll take a look at this soon, it's definitely a bug. Thanks for reporting! |
Hey Nick. |
Github won't let me do that, lame. It's all yours! |
@soupytwist , probably, @sergeyglazyrindev should be added as member first. |
Hey guys!
|
Great analysis! Thank you. Just one thought: don't we have some better way how to find which imports are present than simple text search? |
Yes, I thought about much deeper analysis. But I need to test it with ropevim and vim. Actually, I use emacs, so that's what I could to get just investigating the code sources. But as far as I understand, anyway, much proper solution should be related to analyzing text in code editor because the file could be changed and not saved, so, if we decide to implement it only in rope (which is not by design of autoimport module, as far as I understand) we will need anyway fallback to checking if such import statement present in code editor's opened file (to make it 100% working). So, I can tell a bit more about this problem in a week or so. Right now finalizing one important project. |
Doesn’t ropemacs use ropemode as well? |
Yes, it does. I'll try to do much deeper analysis a bit later. |
In the sqllite implementation under #469 there is an option to pass a list of ignored names. I used this in python-lsp/python-lsp-server#199 to ignore names already defined in the file. |
AutoImport
should not import the given name if it is already imported. Issuing this command many times on the same symbol will just append more importsThe text was updated successfully, but these errors were encountered: