-
Hi all, I'm trying to get my nvim-cmp mappings to show in the cheatsheet. Right now, my plugin config looks like this:
I tried adding just the mappings to my mappings file, and just left the disables for now. This looks like the following
With this next and previous work, but confirm, complete, and abort do not. This makes me think there is something special that has to happen that the plugin handles when you define those in the mappings in the plugin config. Is it possible to add items to the cheatsheet without actually doing anything with the mappings? something like
I gave the documentation a scroll and searched around open/closed issues but didn't see anything. Maybe there is some way to get these mappings to work in the mappings file, but I don't have any ideas. nvim doesn't show any error when I try to open/close/confirm but it just doesn't do anything either. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
this usecase looks complex to me {
"hrsh7th/nvim-cmp",
config = function(_, opts)
local cmp = require('cmp')
-- nvchad mapping syntax! same way we manually load lspconfig mappings
-- check lspconfig file
local mappings = {
plugin = true,
i = {
["<C-p>"] = { cmp.mapping.select_prev_item(), "select prev item" },
["<C-Space>"] = { cmp.mapping.complete(), "show completions" },
},
}
require("core.utils").mappings.cmp = mappings
require("core.utils").load_mappings "cmp"
-- require("core.utils").load_mappings("cmp", { buffer = number })
require("cmp").setup(opts)
end,
}, only caveat this has is that the mappings will work in insert mode regardless of cmp being opened or not, so you have to find a way to get cmp buffer number |
Beta Was this translation helpful? Give feedback.
this usecase looks complex to me
only cave…