local label = cursor_before_line .. suggestions
-- CompletionResponse
{
label = label,
word = label,
textEdit = {
range = {
start = { line = line, character = character },
['end'] = { line = line, character = character },
},
newText = suggestions,
},
}
When cursor_before_line is e and suggestions is mail, ghost_text will show ail and will be missing a character m.
However, when you preview it from <Tab>, the mail is displayed correctly.
Solution
Use get_word so that the word is the same as in core.confirm
Problem
Build a
CompletionResponse
in the following way:When
cursor_before_line
ise
andsuggestions
ismail
, ghost_text will showail
and will be missing a characterm
. However, when you preview it from<Tab>
, themail
is displayed correctly.Solution
Use
get_word
so that the word is the same as incore.confirm