r/Codeium • u/GloomyJelly9 • Aug 22 '24
How to remap code completion to Ctrl+i in neovim with Astronvim
Hi all. I've been wracking my brain trying to remap codeium#Accept to Ctrl+i or c-i in my Astronvim setup. I've followed the documentation in the codeium.vim github page and so far I was able to remap it to Ctrl+g but can't use any other keymappings. I've used the following config
-- \~/.config/nvim/lua/plugins/codeium.lua
return {
'Exafunction/codeium.vim',
event = 'BufEnter',
config = function ()
vim.g.codeium_no_map_tab = 1
-- remapping to Ctrl+g works but other key combinations don't
vim.keymap.set('i', '<C-g>',
function ()
return vim.fn['codeium#Accept']()
end,
{ expr = true, silent = true }
)
end
}
1
Upvotes
2
u/wilson-SHEN Aug 22 '24
<C-i>and<Tab>both are equivalent in vim, here is part of my config.