config: nvim: require explicit selection to confirm completed itme

This commit is contained in:
Thomas Preisner 2023-03-30 23:08:18 +02:00
parent 355ae60ac3
commit b56aecc78d

View file

@ -26,7 +26,7 @@ cmp.setup({
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(), ['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(), ['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. ['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'nvim_lsp', keyword_length = 3 }, { name = 'nvim_lsp', keyword_length = 3 },