TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
625 stars 25 forks source link

Handle text changes when phantom completion is visible #52

Open timfjord opened 1 year ago

timfjord commented 1 year ago

Currently, when a phantom completion is displayed typing characters that match the beginning of the ghost text hides the completion and instantiates a new request.

This can be improved and the currently displayed ghost text can be updated without triggering a new request when typed characters match the begging of the ghost text

TerminalFi commented 1 year ago

I wonder if this could interfere with copilot returning more accurate results. Or different results.

Perhaps we should update the phantom and still request. And if the result doesn't meet the current completion we update.

timfjord commented 1 year ago

As far as I understand, in VSCode they don't do any requests.
At least the status indicator doesn't show anything when you type characters that match the beginning of the ghost text, but I think it is handled on the core level because they use the suggestion API(or what is the official name for it) and it works the same for other completions.

We can do some requests, but I am afraid the experience won't be smooth.
Plus, I don't think that we would see different results there

I would handle this in a follow-up maybe