border for cmp and float windows

This commit is contained in:
Oliver Hartmann 2025-04-03 22:38:30 +02:00
parent 0699d2a3a8
commit 18a85dd239
4 changed files with 14 additions and 5 deletions

View File

@ -23,7 +23,7 @@ opt.showmatch = true -- Show matching braces
opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line
opt.list = true
opt.hidden = true
opt.winborder = 'rounded'
opt.winborder = 'none'
opt.scrolloff = 4
opt.shiftround = true
opt.relativenumber = false

View File

@ -98,8 +98,9 @@ return {
}),
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
documentation = {
winhighlight = 'Normal:CmpDocumentation'
},
},
formatting = {
format = lspkind.cmp_format({

View File

@ -5,7 +5,11 @@ local lspKeys = function(client, bufnr)
vim.keymap.set({ 'n', 'x' }, '<space>a', vim.lsp.buf.code_action,
vim.tbl_extend('error', options, { desc = 'Code action' }))
vim.keymap.set('n', '<space>e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' }))
vim.keymap.set('n', '<space>h', vim.lsp.buf.hover, vim.tbl_extend('error', options, { desc = 'Hover' }))
vim.keymap.set('n', '<space>h',
function()
vim.lsp.buf.hover({ border = 'rounded' })
end,
vim.tbl_extend('error', options, { desc = 'Hover' }))
vim.keymap.set('n', '<space>c', vim.lsp.buf.outgoing_calls,
vim.tbl_extend('error', options, { desc = 'Outgoing calls' }))
vim.keymap.set('n', '<space>C', vim.lsp.buf.incoming_calls,
@ -15,7 +19,10 @@ local lspKeys = function(client, bufnr)
vim.tbl_extend('error', options, { desc = 'Type definition' }))
vim.keymap.set({ 'n', 'i', 'x' }, '<C-k>', vim.lsp.buf.signature_help,
vim.tbl_extend('error', options, { desc = 'Signature help' }))
vim.keymap.set('n', '<space>v', vim.diagnostic.open_float,
vim.keymap.set('n', '<space>v',
function()
vim.diagnostic.open_float({ border = 'rounded' })
end,
vim.tbl_extend('error', options, { desc = 'Diagnostics Float' }))
vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>',
vim.tbl_extend('error', options, { desc = 'Switch Source/Header' }))

View File

@ -33,6 +33,7 @@ return {
['NonText'] = { fg = colors.vulgaris.blue },
['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 },
['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 },
['CmpDocumentation'] = { bg = colors.vulgaris.bg2 },
['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey }
},
})