1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

update nvim-cmp conf, fix hrsh7th/nvim-cmp#880

This commit is contained in:
jdhao 2022-04-10 13:07:02 +08:00
parent 639b3d6067
commit 3134f088cd

View File

@ -10,20 +10,26 @@ cmp.setup({
end,
},
mapping = {
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
['<Tab>'] = {
i = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
c = cmp.config.disable
},
['<S-Tab>'] = {
i = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
c = cmp.config.disable
},
['<Esc>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<C-d>'] = cmp.mapping.scroll_docs(-4),