Confirm only explicitly selected items in autocomp

This commit is contained in:
Emil Miler 2023-02-07 15:03:29 +01:00
parent 91dad4fe61
commit 4be92aa14e

View File

@ -64,7 +64,7 @@ cmp.setup {
}, },
-- Accept currently selected item. If none selected, `select` first item. -- Accept currently selected item. If none selected, `select` first item.
-- Set `select` to `false` to only confirm explicitly selected items. -- Set `select` to `false` to only confirm explicitly selected items.
["<CR>"] = cmp.mapping.confirm { select = true }, ["<CR>"] = cmp.mapping.confirm { select = false },
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()