Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use get_word so that the word is the same as in core.confirm #1860

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luozhiya
Copy link

Problem

Build a CompletionResponse in the following way:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant