codeium.vim
codeium.vim copied to clipboard
Accept corrupts special registers
I have the following to accept suggestion,
vim.keymap.set('i', '<C-e>', function()
return vim.fn['codeium#Accept']()
end, { expr = true, silent = true, desc = 'Codeium accept suggestion' })
and the following to manage clipboard,
if vim.fn.has('clipboard') == 1 then
if vim.fn.has('unnamedplus') == 1 then
vim.o.clipboard = 'unnamedplus'
else
vim.o.clipboard = 'unnamed'
end
Whenever I accept codeium suggestion, contents of following special registers gets erased/corrupted.
on MacOS -> `", *, +, -`
on Linux -> `", +, -`
I am using xclip on Linux (Arch, Ubuntu 20.04), and pbcopy on MacOS.
Let me know if you need any other information.
I was scratching my head about this issue. My clipboard would randomly change or be blank or only have parts of what I'd copy. I thought it was something else about my setup, but it's definitely the accepting of a suggestion that causes it, which is why it seemed so random.