vim-matchup
vim-matchup copied to clipboard
[Bug] Sniprun + matchup cause snippets to automatically be expanded in nvim-cmp
Explain the issue
When enabling vim-matchup and while using luasnip, while tabbing onto a snippet item in the nvim-cmp menu:
The snippet is immediately expanded.
- Using vim 0.10 stable
- Install nvim cmp, luasnip, and setup the plugin based on the wiki in sniprun https://github.com/L3MON4D3/LuaSnip/wiki/Nice-Configs
cmp.setup({
-- ... Your other configuration ...
mapping = {
-- ... Your other mappings ...
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
}
}
I've not changed any matchup settings, just loaded it with lazy
modules["andymass/vim-matchup"] = {
version = false,
lazy = false,
dependencies = { "nvim-treesitter/nvim-treesitter" },
}
- Expected behavior: tab should move past the snippet (because cmp.visible() is true)
- Observed behavior -- snippets are expanded, lsp items arent automatically accepted