Add <C-n>, <C-p> mappings to nvim-cmp setup

Fixes #197
This commit is contained in:
Victor Wallsten 2023-03-09 10:18:56 +01:00
parent 4a37a0a9b1
commit eccdbccbfc
No known key found for this signature in database
GPG Key ID: EDE32A7E30499D01

View File

@ -461,6 +461,8 @@ cmp.setup {
end, end,
}, },
mapping = cmp.mapping.preset.insert { mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
['<C-d>'] = cmp.mapping.scroll_docs(-4), ['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {}, ['<C-Space>'] = cmp.mapping.complete {},