fix(nvim): fix the way diagnostics are configured
This commit is contained in:
parent
2bc44d8535
commit
ded2d9a7b3
1 changed files with 14 additions and 21 deletions
|
@ -7,32 +7,25 @@ vim.diagnostic.config({
|
||||||
source = "always", -- Or "if_many"
|
source = "always", -- Or "if_many"
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
},
|
},
|
||||||
-- signs = {
|
signs = {
|
||||||
-- text = {
|
text = {
|
||||||
-- [vim.diagnostic.severity.HINT] = '💡',
|
[vim.diagnostic.severity.HINT] = '💡',
|
||||||
-- [vim.diagnostic.severity.INFO] = '',
|
[vim.diagnostic.severity.INFO] = '',
|
||||||
-- [vim.diagnostic.severity.WARN] = '',
|
[vim.diagnostic.severity.WARN] = '',
|
||||||
-- [vim.diagnostic.severity.ERROR] = '',
|
[vim.diagnostic.severity.ERROR] = '',
|
||||||
-- },
|
},
|
||||||
-- numhl = {
|
numhl = {
|
||||||
-- [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
|
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
|
||||||
-- [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
|
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
|
||||||
-- [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
|
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
|
||||||
-- [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
|
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
signs = true,
|
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
local signs = { Error = "", Warn = "", Hint = "💡", Info = "" }
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue