32 ["<C-b>"] = cmp.mapping.scroll_docs(-4), |
32 ["<C-b>"] = cmp.mapping.scroll_docs(-4), |
33 ["<C-f>"] = cmp.mapping.scroll_docs(4), |
33 ["<C-f>"] = cmp.mapping.scroll_docs(4), |
34 ["<Tab>"] = cmp.mapping.select_next_item(), |
34 ["<Tab>"] = cmp.mapping.select_next_item(), |
35 ["<S-Tab>"] = cmp.mapping.select_prev_item(), |
35 ["<S-Tab>"] = cmp.mapping.select_prev_item(), |
36 ["<C-g>"] = cmp.mapping.abort(), |
36 ["<C-g>"] = cmp.mapping.abort(), |
37 ["<Right>"] = cmp.mapping.confirm({select = true}), |
37 ["<Right>"] = cmp.mapping.confirm({ select = true }), |
38 ["<Space>"] = function(fallback) |
38 ["<Space>"] = function(fallback) |
39 if cmp.visible() then |
39 if cmp.visible() then |
40 cmp.confirm({select = false}, function() |
40 cmp.confirm({ select = false }, function() |
41 vim.api.nvim_feedkeys(" ", "n", false) |
41 vim.api.nvim_feedkeys(" ", "n", false) |
42 end) |
42 end) |
43 end |
43 end |
44 fallback() |
44 fallback() |
45 end, |
45 end, |