nvim-cmp
nvim-cmp copied to clipboard
Inserting "<Plug>(cmp.u.k.recursive: )" when using tab in insert mode
FAQ
- [X] I have checked the FAQ and it didn't resolve my problem.
Issues
- [X] I have checked existing issues and there are no open or closed issues with the same problem.
Neovim Version
0.6.1
Minimal reproducible config
This is the code I'm using for tab completions, I'll try to get a minimal example here soon.
https://github.com/ChristianChiarulli/nvim/blob/a5f5fb81b652fde891a6abd228cf3e9e878ea218/lua/user/cmp.lua#L132
Description
Since this commit: https://github.com/hrsh7th/nvim-cmp/commit/f4bb6ffdb1d5377be93283ff087a5ff97e23524f
I am unable to use the <Plug>(cmp.u.k.recursive: )
is inserted instead
Steps to reproduce
open any filetype and press tab in insert mode
Expected behavior
tab behaves normally in insert mode
Actual behavior
<Plug>(cmp.u.k.recursive: )
is inserted instead
Additional context
No response
seems to be a copilot thing: https://github.com/hrsh7th/nvim-cmp/issues/459, closing
Hi I got this with latest master, not using copilot. Only other difference is I get this when I press enter. "<Plug>(cmp.u.k.recursive:)".
To fix I used the following which seemed to do the trick:
:LvimCacheReset and :LvimUpdate.
Weird!
Thanks @jimcornmell -- I also don't use copilot and had this problem. But I also don't use LunaVim so don't have that LvimCacheReset command. But this did remind me that it could be an issue with the Impatient plugin. For me, calling :LuaCacheClear
after a fresh update solved the issue. Hope this helps the next person.
Started doing this again for me today, I've removed all plugins and then added one at a time until the error reappeared. It started to go wrong again with the following added to my config:
{
"tpope/vim-eunuch",
event = "BufRead",
},
Still happening for me with the latest nvim-cmp.
The culprit for me seems to be:
imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
This happens whenever I press <S-Tab>
in INSERT mode. The infinite recursion can be stopped by pressing <C-c>
. The following output is left in the buffer:
<SNR>0_(cmp.u.k.recursive:<SNR>0_(cmp.u.k.recursive:[REPEAT MANY TIMES]<SNR>
~~I do have copilot.lua
and copilot-cmp
installed.~~ Happens regardless of whether or not copilot is installed.
Sorry. I lost this issue.
https://github.com/hrsh7th/nvim-cmp/issues/770#issuecomment-1095103398
The above comment is informative. I'll try to check this.
Other comments, I can't guess anything. Sorry.
I tried with tpope/vim-eunuch
but it doesn't display recursive broken mapping.