From 31474998d6935d48f678988c8a7a4fac7bb2ae72 Mon Sep 17 00:00:00 2001 From: ngharo Date: Fri, 29 Dec 2023 17:46:10 -0600 Subject: Inititial commit --- after/plugin/nvim-cmp.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 after/plugin/nvim-cmp.lua (limited to 'after/plugin/nvim-cmp.lua') diff --git a/after/plugin/nvim-cmp.lua b/after/plugin/nvim-cmp.lua new file mode 100644 index 0000000..6548b71 --- /dev/null +++ b/after/plugin/nvim-cmp.lua @@ -0,0 +1,21 @@ +local cmp = require('cmp') +-- using lsp-zero +local cmp_action = require('lsp-zero').cmp_action() + +cmp.setup({ + mapping = cmp.mapping.preset.insert({ + -- `Enter` key to confirm completion + [''] = cmp.mapping.confirm({select = false}), + + -- Ctrl+Space to trigger completion menu + [''] = cmp.mapping.complete(), + + -- Navigate between snippet placeholder + [''] = cmp_action.luasnip_jump_forward(), + [''] = cmp_action.luasnip_jump_backward(), + + -- Scroll up and down in the completion documentation + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + }) +}) -- cgit v1.2.3