Add Import Paths to Suggested Imports in Autocomplete #2693
Replies: 5 comments
-
Thanks for the feedback. One thing you can do is enable tooltip (with CTRL+SHIFT+SPACE) and that will show you more info on each one. |
Beta Was this translation helpful? Give feedback.
-
Hmm, that doesn't seem to work - perhaps I'm doing it wrong? If I understand correctly I wait for autocomplete to pop up, then I press CTRL+SHIFT+SPACE and I should see more information in the dropdown list? I don't see anything new show up, nor does mousing over an entry and pressing CTRL+SHIFT+SPACE have any effect. |
Beta Was this translation helpful? Give feedback.
-
Oh sorry, it's actually CTRL+SPACE to show the tooltip. I keep getting those shortcuts mixed up between VS and VS Code. |
Beta Was this translation helpful? Give feedback.
-
LSP 3.17 introduces better support for these labels; they're already in use in TypeScript as can be seen here: https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/#auto-import-specifiers We do show some info right now (as above): But, we'll be able to put the module name in the tooltip and keep the more python-like full tooltip once we can upgrade to 3.17. |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, it would be great if the autocompletion menu in Pylance informed me which library it intended to import a symbol from.
Here I want to import threading.Event, but the autocomplete is actually going to import multiprocessing.Event. I have no way of knowing this as a user, and worse, once I realize that particular entry is the wrong one I have no way of finding the correct import in the list because I can't disambiguate them. The large number of seemingly identical repeated entries in the list is also confusing. Some more contextual clues to tell what the differences are would be appreciated.
Thanks for the excellent work on this extension!
Beta Was this translation helpful? Give feedback.
All reactions