Exafunction / codeium.vim

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

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

Open dror-g opened 5 months ago

dror-g commented 5 months ago

https://github.com/Exafunction/codeium.vim/blob/a1c3d6b369a18514d656dac149de807becacbdf7/autoload/codeium.vim#L40

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