Add keymaps for tab-completions navigation

Changes to be committed:
      modified:   lua/completions.lua
This commit is contained in:
2023-03-10 23:34:37 +05:30
parent fe0e4266da
commit dcfc051ec4

View File

@@ -32,6 +32,9 @@ cmp.setup({
}, },
mapping = { mapping = {
["<CR>"] = cmp.mapping.confirm({ select = true }), ["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-k>"] = cmp.mapping.scroll_docs(-4),
["<C-j>"] = cmp.mapping.scroll_docs(4),
["<C-e>"] = cmp.mapping.abort(),
["<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()