From a5706b6e73716feaf9215ed2e6f77c7a9c5a9738 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Wed, 13 Oct 2021 11:35:41 -0500 Subject: [PATCH] More keybindings for autocomplete --- nvim/nvim-cmp.vimrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nvim/nvim-cmp.vimrc b/nvim/nvim-cmp.vimrc index 210a9da..b1852f4 100644 --- a/nvim/nvim-cmp.vimrc +++ b/nvim/nvim-cmp.vimrc @@ -18,11 +18,19 @@ lua <'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), + [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }), + [''] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }) }, sources = { { name = 'nvim_lsp' },