disable diagnostic inline text by default to reduce distraction

This commit is contained in:
2025-08-05 23:55:09 +05:00
parent 82e36f6f75
commit 01adfc34b7
3 changed files with 15 additions and 3 deletions

View File

@ -2,7 +2,7 @@ local M = {}
M.setup = function()
local config = {
virtual_text = true,
virtual_text = false,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
@ -12,7 +12,7 @@ M.setup = function()
}
},
update_in_insert = true,
underline = true,
underline = false,
severity_sort = true,
float = {
focusable = true,

View File

@ -19,6 +19,18 @@ return {
require("user.plugins.lsp.diagnostics_config").setup()
-- require("user.lsp.none_ls")
local which_key = require("which-key")
which_key.add({
{
"<leader>ch",
function()
local current = vim.diagnostic.config().virtual_text
vim.diagnostic.config({ virtual_text = not current })
end,
desc = "toggle inline diagnostics"
},
})
vim.cmd([[ command! Format execute 'lua vim.lsp.buf.format{async=true}' ]])
end,
},