-
Notifications
You must be signed in to change notification settings - Fork 771
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
Auto-import should suggest exact matches with higher priority #297
Comments
We're currently working on this (#97); by I believe that this is going to be much, much improved in next week's release (though we're still tweaking things!). |
Oh, that's great! I see two separate issues:
Thanks! |
We're aware of both of these things. I know that the former is what we've been focusing on (getting values), and after that the latter (filtering them and ordering the values now that we have them). |
Great. Thanks. |
P.S. I believe most other IDEs don't offer 'fuzzy' matches for auto-import, and this is why I'm surprised to see so many options in the dropdown. But as long as the best option is selected first, it doesn't matter that much. |
should be fixed in the next version. |
until we improve the memory/CPU issue with auto-indexing, you need "python.analysis.indexing": true in .vscode/settings.json for "add import/auto import" feature for third party libraries to be enabled. |
This is still not fixed, can it be re-opened? I can still reproduce both issues 1 and 2 described above. Issue 1: Here Using latest version |
Set |
We'd appreciate new issues for each of these, if you could. |
I can open a new issue for "issue 1 not fixed when single file is opened". For "issue 2 not fixed" this current issue should be reopened, since it is exactly that. |
Yes, thanks. I didn't notice. |
now, we always enable indexing on stdlib and fixed a bug on ranking that got broken when we did file path normalization. |
This issue has been fixed in version 2022.1.1, which we've just released. You can find the changelog here: CHANGELOG.md |
When showing code actions for
Path
, I get:The fourth item is clearly the one I'm after, as it's an exact match to what I've typed. Personally I'm inclined to think code actions should not suggest 'fuzzy' auto-imports at all (e.g. it's very improbably that I'm looking to import pathccompiler from numpy.distutils). That is, I don't naturally expect auto-complete in code actions, only auto-import of what I've already typed. But my main suggestion is to show the most relevant option (exact match) on top or at least have it initially selected.
The text was updated successfully, but these errors were encountered: