diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-01-07 13:20:49 +0000 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-01-07 13:20:49 +0000 |
commit | b5cd477cb91bf52b90a765a2dab0f9738ac4563c (patch) | |
tree | c92a4b71b2d0bf38e6998d05a4087a35f89c044a /.config | |
parent | fadc58b467878d66405e151d65932c97884e1ab2 (diff) |
Added borders and rounded corners to nvim cmp
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/lua/pluginsconfig/nvim-cmp.lua | 18 |
1 files changed, 14 insertions, 4 deletions
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({ - ['<C-b>'] = cmp.mapping.scroll_docs(-4), - ['<C-f>'] = cmp.mapping.scroll_docs(4), + ['<C-b>'] = cmp.mapping.scroll_docs(-1), + ['<C-f>'] = cmp.mapping.scroll_docs(1), ['<C-Space>'] = cmp.mapping.complete(), ['<C-e>'] = cmp.mapping.abort(), ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. |