feat(nvim): use icons signs for lsp diagnostics

This commit is contained in:
mandlm 2023-01-30 10:42:22 +01:00
parent 7c628f076c
commit d9af4ca236
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7

View File

@ -139,7 +139,7 @@ vim.diagnostic.config({
signs = true,
update_in_insert = true,
underline = true,
severity_sort = false,
severity_sort = true,
float = {
border = "rounded",
source = "always",
@ -148,6 +148,13 @@ vim.diagnostic.config({
},
})
-- setup diagnostics signs
local diagnostics_signs = { Error = "", Want = "", Hint = "", Info = "" }
for type, icon in pairs(diagnostics_signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
-- setup html languageserver
lspconfig["html"].setup({
cmd = { "html-languageserver", "--stdio" },