I am facing a weird issue. I am setting up method through auto suggestion like:
CONCATENATE(n)|
my cursor shows it within parenthesis after n
. like
Now i am start typing again by replacing n
with some value which also suppose to start dispalying auto-suggestion
related to those characters. but it doesn't work until and unless i click in last. then i go back again inside parenthesis and start typing. It starts populating auto-suggestions.
I tried to debug library, and I found change event doesn't work untill i click outside in last.
So, is there any way to handle it or can we add any thing in config to make it work?
monaco.languages.registerCompletionItemProvider(customLanguageConfig.id, {
provideCompletionItems: (model, position) => {
const word = model.getWordUntilPosition(position);
const messageId = 'messageId-' + currentMessageId++;
window.parent.postMessage({
message: _monacoId + "-provide-completion-items",
value: {
messageId: messageId,
textUntilPosition: model.getValueInRange({
startLineNumber: 1,
startColumn: 1,
endLineNumber: position.lineNumber,
endColumn: position.column
}),
range: {
startLineNumber: position.lineNumber,
endLineNumber: position.lineNumber,
startColumn: word.startColumn,
endColumn: word.endColumn-1
}
}
}, "*");
const promise = new Promise((resolve, reject) => {
mapOfCompletionRequests[messageId] = resolve;
});
return promise;
}
});