Open meicale opened 10 months ago
Hi, @meicale,
Thank you for reporting this issue. It seems that the bug occurs when the Tabby plugin attempts to remap the <Tab>
key, which has been modified by lazyvim. Setting a non-<Tab>
keybinding helps avoid this problem.
I will further investigate later and try to make it compatible with lazyvim.
Where are you setting the keybinding? I was able to remap the tabby keybinding within the lua table where I installed it.
// plugins/tabby.lua
return {
"TabbyML/vim-tabby",
event = "BufRead",
init = function()
vim.g.tabby_keybinding_accept = '<C-CR>'
end
}
Hi, all lazyvim users
I just updated the readme in #1173 with some known keymap conflicts that can cause the <tab>
key to not work properly. There are two main reasons for this issue:
<tab>
keymap. The vim-tabby plugin maps keys and performs some other initialization tasks upon the VimEnter
event. However, if there are plugins loaded after this event, they might overwrite the keymap.<C-R>
key has been mapped to a customized function, it can cause problems on inserting suggestion. The vim-tabby plugin internally utilizes the <C-R><C-O>
command to insert the completion. If <C-R>
is remapped, vim-tabby will not be able to insert completions properly.The conflict is here https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/coding.lua#L121-L137
I don't know if there is a workaround other than setting another key for Tabby
I'm new to LazyVim and only been using it for less than a day, but my workaround was to disable that specific key from the coding.lua using overrides (this way you dont have to modify and keep track of upstream source code):
-- Avoids conflict with Tabby
return {
{
"nvim-cmp",
keys = {
{ "<Tab>", mode = { "i", "s" }, false },
},
},
}
This does disable tab for the snippet function, I don't use it but if you're attached to it, you can remap it to another key!
Describe the bug A clear and concise description of what the bug is. Can not setup keybinding in lazyvim, so the tab can not be used to accept the code gennerated.
Information about your version
Please provide output of
tabby --version
no need Information about your GPU Please provide output ofnvidia-smi
no need Additional context Add any other context about the problem here. I tried other key such as '9' and it can be used by this settingI guess this may caused mainly by lazyvim(starter), but I think it is helpful to add some tips and tricks to solve this. Since lazyvim is a popular neovim distribution. Thx!