From b5cd477cb91bf52b90a765a2dab0f9738ac4563c Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Sun, 7 Jan 2024 13:20:49 +0000 Subject: Added borders and rounded corners to nvim cmp --- .config/nvim/lua/pluginsconfig/nvim-cmp.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to '.config/nvim/lua/pluginsconfig/nvim-cmp.lua') diff --git a/.config/nvim/lua/pluginsconfig/nvim-cmp.lua b/.config/nvim/lua/pluginsconfig/nvim-cmp.lua index dcde40a..4252705 100644 --- a/.config/nvim/lua/pluginsconfig/nvim-cmp.lua +++ b/.config/nvim/lua/pluginsconfig/nvim-cmp.lua @@ -16,12 +16,22 @@ end end, }, window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), + completion = { + border = "rounded", + winhighlight = "Normal:Pmenu,CursorLine:PmenuSel,FloatBorder:FloatBorder,Search:None", + col_offset = -3, + side_padding = 1, + scrollbar = false, + scrolloff = 8, + }, + documentation = { + border = "rounded", + winhighlight = "Normal:Pmenu,FloatBorder:FloatBorder,Search:None", + }, }, mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.scroll_docs(-1), + [''] = cmp.mapping.scroll_docs(1), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. -- cgit v1.2.3