-- disable underline vim.diagnostic.handlers.underline.show = function() end return { { "folke/trouble.nvim", event = { "LspAttach" }, config = function() -- Diagnostics require("trouble").setup({ use_diagnostic_signs = true, -- enabling this will use the signs defined in your lsp client }) end, keys = { { "xt", ":Telescope diagnostics" }, { "gr", ":Trouble lsp_references" }, { "xw", ":Trouble workspace_diagnostics" }, { "xd", ":Trouble document_diagnostics" }, { "[g", "lua vim.diagnostic.goto_prev()" }, { "]g", "lua vim.diagnostic.goto_next()" }, }, }, { "Maan2003/lsp_lines.nvim", event = { "LspAttach" }, name = "lsp_lines.nvim", config = function() local signs = { Error = " ", Warning = " ", Warn = " ", Hint = "", Info = " ", Other = "", } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end require("lsp_lines").setup() vim.schedule(function() vim.diagnostic.config({ severity_sort = true, virtual_text = false, virtual_improved = { severity = { min = vim.diagnostic.severity.WARN }, current_line = "hide", }, virtual_lines = { severity = { min = vim.diagnostic.severity.HINT }, highlight_whole_line = false, only_current_line = true, }, }) end) end, keys = { { "l", function() if vim.diagnostic.config().virtual_improved then vim.diagnostic.config({ virtual_improved = false }) else vim.diagnostic.config({ virtual_improved = { severity = { min = vim.diagnostic.severity.WARN }, current_line = "hide", }, }) end end, desc = "Toggle Virtual Text", }, }, }, }