Use insertText as filterText for js/ts completions by default

For some completions—such as those provided
 by IntelliCode—the label results in the incorrect sort order. IntelliCode prefixes completion labels with a unicode star, which means they appear after the normal completions

This fix make sure we use the actual text to be inserted for filtering by default instead of the label
This commit is contained in:
Matt Bierner 2018-11-28 19:05:40 -08:00
parent 364824a864
commit cd5b4d1bb3

View file

@ -63,6 +63,7 @@ class MyCompletionItem extends vscode.CompletionItem {
if (tsEntry.insertText) {
this.insertText = tsEntry.insertText;
this.filterText = tsEntry.insertText;
if (tsEntry.replacementSpan) {
this.range = typeConverters.Range.fromTextSpan(tsEntry.replacementSpan);