mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
use label2 when CompletionEntry#source is a path inside the workspace
This commit is contained in:
@@ -62,6 +62,13 @@ class MyCompletionItem extends vscode.CompletionItem {
|
||||
// De-prioritze auto-imports
|
||||
// https://github.com/microsoft/vscode/issues/40311
|
||||
this.sortText = '\uffff' + tsEntry.sortText;
|
||||
|
||||
// Render "fancy" when source is a workspace path
|
||||
const qualifierCandidate = vscode.workspace.asRelativePath(tsEntry.source);
|
||||
if (qualifierCandidate !== tsEntry.source) {
|
||||
this.label2 = { name: tsEntry.name, qualifier: qualifierCandidate };
|
||||
}
|
||||
|
||||
} else {
|
||||
this.sortText = tsEntry.sortText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user