diff --git a/client/src/common/completion.ts b/client/src/common/completion.ts index 79ffb7de9..d455571bd 100644 --- a/client/src/common/completion.ts +++ b/client/src/common/completion.ts @@ -91,7 +91,7 @@ export class CompletionItemFeature extends TextDocumentLanguageFeature | completionProvider: { triggerCharacters: ['.'], allCommitCharacters: [';'], - resolveProvider: false, + resolveProvider: true, }, signatureHelpProvider: { }, @@ -372,7 +372,7 @@ connection.languages.diagnostics.onWorkspace(async (params, token, _, resultProg return { items: [] }; }); -connection.onCompletion((params, token): CompletionItem[] => { +connection.onCompletion((params, token): CompletionList => { const result: CompletionItem[] = []; let item = CompletionItem.create('foo'); result.push(item); @@ -407,7 +407,9 @@ connection.onCompletion((params, token): CompletionItem[] => { item.kind = CompletionItemKind.Field; result.push(item); - return result; + const list = CompletionList.create(result, true); + list.itemDefaults = { data: 'abc' }; + return list; }); connection.onCompletionResolve((item): CompletionItem => {