diff --git a/src/server/features/completionItemProvider.ts b/src/server/features/completionItemProvider.ts index ef914c7..49060fd 100644 --- a/src/server/features/completionItemProvider.ts +++ b/src/server/features/completionItemProvider.ts @@ -222,7 +222,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP ): Promise { if (item == null) return undefined - let { uri, position, source, name } = item.data + let { uri, position, source, name, data } = item.data const filepath = this.client.toPath(uri) if (!filepath) return undefined let document = workspace.getDocument(uri) @@ -232,7 +232,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP filepath, position ), - entryNames: [source ? { name, source } : name] + entryNames: [source ? { name, source, data } : name] } let response: ServerResponse.Response diff --git a/src/server/utils/completionItem.ts b/src/server/utils/completionItem.ts index 3100663..d6b4cbb 100644 --- a/src/server/utils/completionItem.ts +++ b/src/server/utils/completionItem.ts @@ -106,6 +106,7 @@ export function convertCompletionEntry( uri, position, name: tsEntry.name, + data: tsEntry.data, source: tsEntry.source || '' } }