I'm using provideInlineCompletionItems to show some code suggestions. I do an API call and I would like to show the code suggestion although the user change the active document.
Currently it works fine if the user doesn't change the position, tut it seems that VSCode doesn't show the suggestions if the position changes:
result.items.push({
insertText: insertText,
range: new Range(position.line, 0, position.line, insertText.length),
});
I have also tried to go to the first position before to return the suggestions:
vscode.window.showTextDocument(activeDocument, {
selection: new Range(position.line, 0, position.line, 0),
});
``