-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
*dev-questionVS Code Extension Development QuestionVS Code Extension Development QuestionsuggestIntelliSense, Auto CompleteIntelliSense, Auto Complete
Description
- VSCode Version: master
- OS Version: ---
Building TabNine we encountered a bug in completions, where sortText is ignored if any CompletionItem does not contain sortText attribute. This causes the IDE to totally ignore the sortText in the ordering, forcing the sort algorithm to fallback to label only.
Steps to Reproduce:
- Use suggestions from a source that provide
sortText(such TabNine) & a source that does not providesortText(such the built in lsp). - Completions suggestions's ordering will be based on the
labeland not on thesortText.
I traced the bug to this line:
https://github.com/microsoft/vscode/blob/master/src/vs/editor/contrib/suggest/suggest.ts#L274
The problem is that it is checked that sortText is present on both CompletionItems, breaking the sort functionality if any single item does not implement sortText.
Does this issue occur when all extensions are disabled?: Yes
Metadata
Metadata
Assignees
Labels
*dev-questionVS Code Extension Development QuestionVS Code Extension Development QuestionsuggestIntelliSense, Auto CompleteIntelliSense, Auto Complete