Closed netrolite closed 6 months ago
You should use ``cmp.mapping.select_next_item instead.
https://github.com/hrsh7th/nvim-cmp/blob/main/doc/cmp.txt#L176
I ended up going with this:
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
Works perfectly now. Thank you!
I'm looking to get the same behavior as in VSCode:
https://github.com/hrsh7th/nvim-cmp/assets/67281212/72e5e073-a2e9-451c-aac9-793f68f633c4
The reason I don't want to insert the selected suggestion before confirming it is because if there's no suggestion that I need and I close the completion menu, I don't want to have the last selected suggestion inserted into the buffer.
Haven't found any options that allow me to do that. Any help? I'm using the latest version (commit 04e0ca3)
Here's my current nvim-cmp config: