Replies: 2 comments 2 replies
-
Can you reproduce this without the preconfigured thing? It also worth to check if your distro has mapped |
Beta Was this translation helpful? Give feedback.
-
I too had a similar problem. Without this Insert -> Esc -> Insert song and dance cmp would show a completion list, but will happily insert a normal Tab when I press it, instead of actually completing. Tried many options cmp-side, but your comment made me realize that I switched to lazy.nvim around the same time I started experiencing this problem. Checked - and indeed - it was loading cmp with Thanks. Maybe in your case it's some auto command tied to Running atm with local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
end,
},
mapping = cmp.mapping.preset.insert({
["<C-d>"] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = false, -- if true - will select first item automatically even if you don't want to
}),
["<Tab>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "s" }),
["<S-Tab>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "s" }),
}),
-- + sources etc
})
|
Beta Was this translation helpful? Give feedback.
-
Hey there,
Here is my nvim-cmp config (using LazyVim)
Everything works great, but one rather odd thing is hitting does not complete the suggestion until I do one cycle of "normal mode, insert mode, normal mode". So I need to basically perform this cycle and then will begin accepting my completion item. I also tried with not lazy loading nvim-cmp just incase but I still run into this issue. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions