Update nvim-cmp config

This commit is contained in:
2023-09-09 04:55:26 +02:00
parent a29f1e6094
commit 2f6b1d1613
+21 -5
View File
@@ -63,7 +63,6 @@ cmp.setup({
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping(
function (fallback)
@@ -92,7 +91,6 @@ cmp.setup({
end
end, { "i", "s", }
),
["<S-Tab>"] = cmp.mapping(
function (fallback)
if cmp.visible() then
@@ -104,14 +102,32 @@ cmp.setup({
end
end, { "i", "s", }
),
["<Down>"] = cmp.mapping(
function (fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s", }
),
["<Up>"] = cmp.mapping(
function (fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s", }
),
},
sources = {
-- { name = 'buffer' },
{ name = "path", },
{ name = "nvim_lsp", },
{ name = "luasnip", },
{ name = "path", },
-- { name = 'buffer' },
-- { name = 'nvim_lsp_signature_help' },
-- { name = 'nvim_lua' },
{ name = "luasnip", },
},
})