disable diagnostic inline text by default to reduce distraction
This commit is contained in:
@ -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,
|
||||
|
||||
@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user