Exafunction / codeium.vim

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

Ghosting of suggestion when leaving insert mode #106

Open martin-braun opened 1 year ago

martin-braun commented 1 year ago

I think an animation says more than 1000 words:

2023-04-01 8 08 25 PM

As you can see, when I cancel insert mode with CTRL+C while having a suggestion, there is only one way to get rid of the suggestion which I like to call ghost suggestion: I have to go back into insert mode at the point where the suggestion is.

As much as I like Codeium (my first impression gives me appeal and satisfaction), this is a bitter piece that ships with it. I often cancel insert mode somewhere, just delete my stuff and move along, but the suggestion will remain and occupy valuable space. It also causes a lot of confusion along the way.

Possible solution: Remove all suggestions when going back into normal mode. Suggestions should only be a thing in insert mode, they should not?

martin-braun commented 1 year ago

I found a better solution to my problem. I can simply map <CMD>call codeium#Clear()<CR> to <C-c> in normal mode, so that I can remove the suggestion by pressing <C-c> again.

I don't know if it is meant to have the suggestion available on normal mode to be honest.

martin-braun commented 1 year ago

It starts to annoy me, so I tried to remove the suggestion when leaving insert mode without pressing C-c twice. I tried to map C-c on insert mode, but then I lose the default behavior. I reopen this, because I think an option should be implemented to automatically remove suggestions in normal/visual mode.

klew commented 1 year ago

Which editor do you use? I have never seen such behavior in my vim setup.

martin-braun commented 1 year ago

@klew Neovim (https://github.com/NvChad/NvChad/ + https://github.com/martin-braun/CocChad) on macOS.

So you say the suggestions should disappear automatically on normal mode?