You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mainly use C-c (or Ctrl+C) to switch from insert mode back to normal mode rather than Esc.
This causes an annoying behaviour with the virtual text: codeium.nvim does not clear the virtual text when hitting C-c. This leaves the suggsted virtual text in the buffer while being in normal mode and only disappears again when switching into insert mode and hitting Esc.
Is there a way to make codeium.nvim also clear virtual text when hitting C-c?
Thanks!
The text was updated successfully, but these errors were encountered:
Ok, this is not a bug, or an issue with codeium.nvim but rather how C-c is handled by neovim.
This explains why the virtual text is not cleared on C-c (see neovim docs):
InsertLeave Just after leaving Insert mode. Also when
using CTRL-O i_CTRL-O. But not for i_CTRL-C.
InsertLeave is used in codeium.nvim to clear the virtual text when leaving insert mode.
Basically, there are two ways to fix this:
Remap C-c to Esc (easy, but might not be what you want)
Trigger a custom Autocmd-Event on C-c (more sophisticated, but Ecs and C-c stay different (as it is intended))
Remap C-c to Esc
map("i", "<C-c>", "<Esc>", { desc="Map Ctrl+C to Esc" })
Hey guys,
I mainly use
C-c
(or Ctrl+C) to switch from insert mode back to normal mode rather thanEsc
.This causes an annoying behaviour with the virtual text: codeium.nvim does not clear the virtual text when hitting
C-c
. This leaves the suggsted virtual text in the buffer while being in normal mode and only disappears again when switching into insert mode and hittingEsc
.Is there a way to make codeium.nvim also clear virtual text when hitting
C-c
?Thanks!
The text was updated successfully, but these errors were encountered: