Skip to content

Commit

Permalink
adopt CompletionItem#preselect in TypeScript #35551
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jun 18, 2018
1 parent 62e0f34 commit 3595e26
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class MyCompletionItem extends vscode.CompletionItem {
if (tsEntry.isRecommended) {
// Make sure isRecommended property always comes first
// https://github.com/Microsoft/vscode/issues/40325
this.sortText = '\0' + tsEntry.sortText;
this.sortText = tsEntry.sortText;
this.preselect = true;
} else if (tsEntry.source) {
// De-prioritze auto-imports
// https://github.com/Microsoft/vscode/issues/40311
Expand Down Expand Up @@ -594,4 +595,4 @@ export function register(
return vscode.languages.registerCompletionItemProvider(selector,
new TypeScriptCompletionItemProvider(client, typingsStatus, fileConfigurationManager, commandManager),
...TypeScriptCompletionItemProvider.triggerCharacters);
}
}

0 comments on commit 3595e26

Please sign in to comment.