update lsp diagnostics to use internal functions

This commit is contained in:
kyasuda
2025-05-02 10:14:59 -07:00
parent a8f250f96b
commit ab352ba2a9
5 changed files with 47 additions and 20 deletions

View File

@@ -71,3 +71,15 @@ local border = {
-- l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
-- l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
o.winborder = "rounded"
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
float = { border = "rounded", source = true },
severity_sort = true,
})
vim.keymap.set("", "<Leader>tl", function()
local current = vim.diagnostic.config().virtual_text
vim.diagnostic.config({ virtual_text = not current })
end, { desc = "Toggle diagnostics virtual text" })