From 4eff03aa6556ff0f61aa3be9099614a183df40c7 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 18 Apr 2022 00:22:58 +0300 Subject: nvim: update cmp config, we should learn this thing --- .config/nvim/lua/plugin_settings.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index 0c1c322..ccf3827 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -300,16 +300,20 @@ cmp.setup({ vim.fn["UltiSnips#Anon"](args.body) end, }, - mapping = { + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ [''] = 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(cmp.mapping.complete(), { 'i', 'c' }), [''] = cmp.mapping({ i = cmp.mapping.abort(), c = cmp.mapping.close(), }), [''] = cmp.mapping.confirm({ select = true }), - }, + }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'ultisnips' }, -- cgit v1.2.3-70-g09d2