feat(vim): support nvim diagnostic popups for lsp

This has a better look and it makes all the hover popups look the same
from the linters to lsp.
This commit is contained in:
Ade Attwood 2023-01-20 07:55:47 +00:00
parent 64483f8cf6
commit 0598663b42

View file

@ -70,3 +70,16 @@ vim.fn.sign_define(
"DiagnosticSignError",
{ text = "", texthl = "DiagnosticSignError", numhl = "DiagnosticSignError" }
)
local border = 'rounded'
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border})
vim.lsp.handlers["textDocument/show_line_diagnostics"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border})
vim.lsp.handlers["textDocument/diagnostic"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border})
vim.lsp.handlers["textDocument/diagnostics"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border})
vim.diagnostic.config({
float = {
focusable=false,
border = border
}
})