feat!(cmp): change autocomplete behaviour

- BREAKING CHANGE: no more automatic popping droplist
- BREAKING CHANGE: <CR> to complete instead of <C-l>
This commit is contained in:
Fabrice Mouhartem 2024-10-18 17:07:22 +02:00
parent 22e70f9725
commit 0a73bd4259
Signed by: fmouhart
GPG Key ID: 2C5033B228CFE4E7

View File

@ -17,6 +17,7 @@ cmp.setup {
},
completion = {
completeopt = 'menu,menuone,noinsert',
autocomplete = false,
},
mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item(),
@ -24,7 +25,7 @@ cmp.setup {
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {},
['<C-l>'] = cmp.mapping.confirm {
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},