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:
parent
a9efbede25
commit
48d64d6de1
1 changed files with 6 additions and 1 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue