auto-pairs
auto-pairs copied to clipboard
On start issue
Hey there,
I'm having an issue where if I press ;
or /
when I start neovim. I get this error. I have isolated the problem to this plugin, because when I delete it it doesn't error. When I do something first, like opening a file, it won' give me this error.
Error detected while processing function <lambda>261[1]..<SNR>96__open_win: line 22:
5555: API call: Vim(let):E716: Key not present in Dictionary: "rhs"
https://user-images.githubusercontent.com/68817281/226198754-b0bba11c-eded-4eb4-b540-b642d422e21a.mp4
Looks like <CR>
is remapped, and maparg
spews out something unexpected. There's probably an incompatible plugin. What's the output of imap <CR>
?
It's linked to cmp.utils.keymap.set_map
from hrsh7th/nvim-cmp
, which is required by VonHeikemen/lsp-zero.nvim
. However, I have switched to cohama/lexima.vim
which does the same thing as this and is compatible.
If a different plugin has the same problem, then it's not auto-pairs' or lexima's fault. It's either the other plugin, or your version of nvim interacting weirdly with maparg
Relevant neovim bug: https://github.com/neovim/neovim/issues/23666 Extended debugging over in my fork: https://github.com/LunarWatcher/auto-pairs/issues/78
TL;DR: Lua mappings don't populate rhs
(which is guaranteed populated by the docs), breaking compatibility with auto-pairs