fix completion scrolling keybinds

This commit is contained in:
2024-10-09 15:25:48 +02:00
parent e099c4c688
commit a4468aa339

View File

@@ -19,11 +19,11 @@ cmp.setup({
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
-- Use <C-b/f> to scroll the docs -- Use <C-b/f> to scroll the docs
['K'] = cmp.mapping.scroll_docs(-4), ['<C-K>'] = cmp.mapping.scroll_docs(-4),
['J'] = cmp.mapping.scroll_docs(4), ['<C-J>'] = cmp.mapping.scroll_docs(4),
-- Use <C-k/j> to switch in items -- Use <C-k/j> to switch in items
['k'] = cmp.mapping.select_prev_item(), ['<C-k>'] = cmp.mapping.select_prev_item(),
['j'] = cmp.mapping.select_next_item(), ['<C-j>'] = cmp.mapping.select_next_item(),
-- Use <CR>(Enter) to confirm selection -- Use <CR>(Enter) to confirm selection
-- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
['<CR>'] = cmp.mapping.confirm({ select = true }), ['<CR>'] = cmp.mapping.confirm({ select = true }),