Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim
https://codeium.com
MIT License
3.68k stars 124 forks source link

Partial completions (single word or line) make unnecessary completion requests #383

Open FuexFollets opened 1 week ago

FuexFollets commented 1 week ago

After accepting single word or single line completions with codeium#AcceptNextWord or codeium#AcceptNextLine codeium makes new requests which returns new suggestions each time. The problem here is that it discards the previous completion and makes unnecessary requests. Additionally, someone may want to only accept a few words or lines of the completion, not just one. Also, if the rest of the completion was cached, completions after single words would be much faster.

LeonardoMor commented 1 week ago

This is true and I understand. But what if I wanted only the n next words and then a new suggestion? I guess you could make it so that the trigger suggestion deletes the cached completion and repopulates it. But I don't know, there might be better ways to do it.

It would be really cool to do something like 3<C-Right> to accept the next 3 words for example. Or 2<Right> to accept the next two lines. But this looks difficult to implement. At least for me.