Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim

Home Page:https://codeium.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tab_fallback default is `\t`, even if user changes default #Accept keybind.

dror-g opened this issue · comments

let default = get(g:, 'codeium_tab_fallback', pumvisible() ? "\<C-N>" : "\t")

If a user changes the default keybind for codeium#Accept, whenever he uses that key and there's no completion available -
a tab (\t) will be inserted.

For example, if user sets this as per readme:
vim.keymap.set('i', '<C-g>', function () return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
when no completions available a \t will be used.

The solution at present is to use:
vim.g.codeium_tab_fallback = '<C-g>'

I think this needs to be resolved, with the plugin code defaulting to normal key behaviour if no completion,
Or at least mention this behaviour in readme until fixed.

Thanks