Clean up cmp bindings, add tab bind

master
Drake 2 years ago
parent 0d26a84b4b
commit 96f614f837

@ -11,15 +11,15 @@ require("filetype").setup {
cmp.setup({
mapping = {
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-y>'] = cmp.config.disable,
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },

Loading…
Cancel
Save