-
Notifications
You must be signed in to change notification settings - Fork 769
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] show more suggestions via fuzzy text. #217
Comments
Thanks for the suggestion. There's no single "right" way to determine which suggestions to show or which order to display them. Pylance incorporates a complex set of heuristics that take into account context, fuzzy text matching, symbol types, and historical usage. It's significantly more sophisticated than the method used by Jedi. So our goal is not to simply copy Jedi here. Can you provide more details about what you like about Jedi's results in this specific example? It sounds like you want the fuzzy text matching to be slightly "fuzzier"? If I adjust our "similarity cutoff" just slightly, the additional suggestions appear. But there's a tradeoff in doing this. It means the suggestions will be noisier. @jakebailey & @savannahostrowski , I'm interested in your thoughts here. If I change |
After a few completions, we mark the completion list as "complete" to save CPU time as the user continues typing. If the server does any sort of filtering, then when the client (VS Code) stops querying and starts doing its own filtering, things will be missing. That's what's happening here. In MPLS (and Jedi), the server returns the first completion list as complete the first time and then lets the client do the rest of the filtering. Arguably, this is the simplest way to get good fuzzy matching. But in our case, we have auto-import completions we'd also like to save work on calculating if their names aren't similar, which requires more filtering, and so we can't mark the first completion as complete (without including a world's worth of auto-import suggestions). This will take a bit of work to figure out how to fix up efficiently, maybe move some matching back into Pylance to save work internally rather than trying to go for full completeness. |
This should be fixed via #608 as well. |
write
pr
and see the suggestion list:using jedi:
using Pylance:
in Pylance, we can't see
PermissionError
andPendingDeprecationWarning
.The text was updated successfully, but these errors were encountered: