summaryrefslogtreecommitdiff
path: root/lua/completions.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/completions.lua')
-rw-r--r--lua/completions.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/completions.lua b/lua/completions.lua
index f7598a6..770de43 100644
--- a/lua/completions.lua
+++ b/lua/completions.lua
@@ -14,6 +14,22 @@ cmp.setup({
14 c = cmp.mapping.close(), 14 c = cmp.mapping.close(),
15 }), 15 }),
16 ['<CR>'] = cmp.mapping.confirm({ select = true }), 16 ['<CR>'] = cmp.mapping.confirm({ select = true }),
17
18 ['<C-n>'] = cmp.mapping(function(fallback)
19 if cmp.visible() then
20 cmp.select_next_item()
21 else
22 fallback()
23 end
24 end, { 'i', 's' }),
25
26 ['<C-p>'] = cmp.mapping(function(fallback)
27 if cmp.visible() then
28 cmp.select_prev_item()
29 else
30 fallback()
31 end
32 end, { 'i', 's' }),
17 }, 33 },
18 sources = cmp.config.sources({ 34 sources = cmp.config.sources({
19 { name = 'nvim_lsp' }, 35 { name = 'nvim_lsp' },