From f51495d2755be5e231fba62d368751c56bcbfcc2 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 13 Apr 2022 23:13:08 +0300 Subject: nvim: update nvim_lsp mappings --- .config/nvim/lua/plugin_settings.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to '.config') diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index cb27343..0c1c322 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -301,17 +301,22 @@ cmp.setup({ end, }, mapping = { - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.close(), + [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), + [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), + [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), + [''] = cmp.mapping({ + i = cmp.mapping.abort(), + c = cmp.mapping.close(), + }), [''] = cmp.mapping.confirm({ select = true }), }, - sources = { + sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'ultisnips' }, + }, { { name = 'buffer' }, - } + { name = 'path' }, + }) }) -- }}} nvim-cmp -- -- cgit v1.2.3-70-g09d2