Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On start issue #362

Open
7ijme opened this issue Mar 19, 2023 · 4 comments
Open

On start issue #362

7ijme opened this issue Mar 19, 2023 · 4 comments

Comments

@7ijme
Copy link

7ijme commented Mar 19, 2023

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"
2023-03-19.16-27-54.mp4
@LunarWatcher
Copy link

Looks like <CR> is remapped, and maparg spews out something unexpected. There's probably an incompatible plugin. What's the output of imap <CR>?

@7ijme
Copy link
Author

7ijme commented Mar 19, 2023

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.

@LunarWatcher
Copy link

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

@LunarWatcher
Copy link

LunarWatcher commented May 17, 2023

Relevant neovim bug: neovim/neovim#23666
Extended debugging over in my fork: LunarWatcher/auto-pairs#78

TL;DR: Lua mappings don't populate rhs (which is guaranteed populated by the docs), breaking compatibility with auto-pairs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants