feat(nvim-cmp.lua): change mapping confirm behavior to select current suggestion by default

This commit is contained in:
David Ibia
2024-03-17 15:03:17 +01:00
parent 5a617aeaff
commit a96a4f719e

View File

@@ -16,7 +16,7 @@ cmp.setup({
},
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<CR>"] = cmp.mapping.confirm({ select = false }), -- accept current selection
["<CR>"] = cmp.mapping.confirm({ select = true }), -- accept current selection
}),
-- sources for autocompletion
sources = cmp.config.sources({