nvim: after/plugin/cmp: Update settings

Seems we missed a few things last time. The formatting.fields thing is
a new feature.
This commit is contained in:
Sanchayan Maity 2021-10-12 19:06:49 +05:30
parent a9efbede25
commit 48d64d6de1

View file

@ -2,7 +2,12 @@ local cmp = require 'cmp'
local lspkind = require 'lspkind'
cmp.setup {
preselect = cmp.PreselectMode.None,
completion = {
completeopt = 'menu,menuone,noinsert',
},
formatting = {
fields = { 'kind', 'abbr', 'menu' },
format = function(entry, vim_item)
vim_item.menu = ({
buffer = '[Buffer]',
@ -28,7 +33,7 @@ cmp.setup {
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true
select = false
}),
},
sources = {