more clever sortText for TypeScript completion items, fixes #1190

This commit is contained in:
Johannes Rieken 2016-01-19 10:51:02 +01:00
parent cb30cde085
commit 1d7facf02b

View file

@ -21,7 +21,7 @@ class MyCompletionItem extends CompletionItem {
constructor(entry: CompletionEntry) {
super(entry.name);
this.sortText = entry.sortText;
this.sortText = `${entry.name}-${entry.sortText}`; // tsserver sortText is "0" and "1" which is not good when comparing to snippets for instance
this.kind = MyCompletionItem.convertKind(entry.kind);
}