Add rounded borders to LSP/Diagnostics float windows
This commit is contained in:
parent
890fe6f928
commit
0bfd392b20
@ -118,10 +118,34 @@ return {
|
|||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
-- { name = 'cmdline' },
|
-- { name = 'cmdline' },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Disable displaying diagnostics as virtual text
|
-- Customise LSP UI
|
||||||
vim.diagnostic.config({ virtual_text = false })
|
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.hover, {
|
||||||
|
border = 'rounded',
|
||||||
|
title = 'Hover',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.signature_help, {
|
||||||
|
border = 'rounded',
|
||||||
|
title = 'Signature Help'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Customise diagnostics UI
|
||||||
|
vim.diagnostic.config({
|
||||||
|
float = {
|
||||||
|
border = 'rounded', -- Enable rounded border on floats
|
||||||
|
},
|
||||||
|
virtual_text = false, -- Disable trailing virtual text
|
||||||
|
})
|
||||||
|
|
||||||
-- Diagnostic mappings
|
-- Diagnostic mappings
|
||||||
-- TODO: trouble.nvim mappings instead? https://youtu.be/MuUrCcvE-Yw?t=631
|
-- TODO: trouble.nvim mappings instead? https://youtu.be/MuUrCcvE-Yw?t=631
|
||||||
|
Loading…
x
Reference in New Issue
Block a user