-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Sorting of intellisense suggestions not optimal in this case #29613
Comments
Can you explain why? Do you want to penalise based on word/patten length difference? That usually yields bad results for prefix matches (c -> constructorFunction vs c -> notCool). In the case above both have the same score and we fallback to the initial sorting. |
@jrieken yeah I see the problem. maybe in this case what I would really want is to sort suggestions by distance, e.g. since |
Fully agreed but scoring cannot do that. However, when equal scores are computed (like in this case) we fallback to the sort order the provider influences (via sort text). Moving on to TS/JS |
Yes, typescript currently returns both of these completions with the same weight:
We should give a higher weight to local variables and parameters. I believe this weight would only be used when the filter text of the two items are the same |
Tracked by microsoft/TypeScript#15024 upstream |
In this case I would expect
canceled
to show up first:The text was updated successfully, but these errors were encountered: