Fix converter

This commit is contained in:
Pine Wu
2020-01-21 10:29:53 +01:00
parent 548becbb88
commit 999af5dc91
3 changed files with 6 additions and 4 deletions

View File

@@ -849,7 +849,10 @@ export namespace CompletionItem {
export function to(suggestion: modes.CompletionItem, converter?: CommandsConverter): types.CompletionItem {
const result = new types.CompletionItem(typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name);
result.label2 = suggestion.label;
if (typeof suggestion.label !== 'string') {
result.label2 = suggestion.label;
}
result.insertText = suggestion.insertText;
result.kind = CompletionItemKind.to(suggestion.kind);
result.tags = suggestion.tags && suggestion.tags.map(CompletionItemTag.to);

View File

@@ -1386,7 +1386,6 @@ export class CompletionItem implements vscode.CompletionItem {
constructor(label: string, kind?: CompletionItemKind) {
this.label = label;
this.label2 = { name: label };
this.kind = kind;
}