I want to display an arbitrary character string as the next candidate based on the code entered with the ace editor. I know how to extend the normal code completion function as follows.
However, I would like to create a function that predicts a character string that displays B, C, and D as the next candidate when A is entered instead of code completion.
ex)
Input value:A
Candidate:B,C,D←I want to display this in the form of displaying existing code completion
let Completer = {
getCompletions: function (editor, session, pos, prefix, callback) {
var wordList = ["apple", "banana", "bar"];
callback(
null,
wordList.map(function (word) {
return {
caption: word,
value: word,
meta: "string",
};
})
);
},
};