configure diagnostics globally
This commit is contained in:
parent
e0496c97f9
commit
a74219cf8e
|
@ -1,13 +1,17 @@
|
||||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
vim.diagnostic.config({
|
||||||
virtual_text = {
|
virtual_text = false,
|
||||||
prefix = '●', -- Could be '■', '▎', 'x'
|
signs = true,
|
||||||
source = 'always',
|
|
||||||
},
|
|
||||||
-- signs = true,
|
|
||||||
underline = false,
|
underline = false,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
|
severity_sort = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
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.cmd [[
|
vim.cmd [[
|
||||||
sign define LspDiagnosticsSignError text= texthl= linehl= numhl=LspDiagnosticsLineNrError
|
sign define LspDiagnosticsSignError text= texthl= linehl= numhl=LspDiagnosticsLineNrError
|
||||||
sign define LspDiagnosticsSignWarning text= texthl= linehl= numhl=LspDiagnosticsLineNrWarning
|
sign define LspDiagnosticsSignWarning text= texthl= linehl= numhl=LspDiagnosticsLineNrWarning
|
||||||
|
|
Loading…
Reference in New Issue