From d9af4ca236334aab35f88b8d56b4c6612b50b96f Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 30 Jan 2023 10:42:22 +0100 Subject: [PATCH] feat(nvim): use icons signs for lsp diagnostics --- home-manager/neovim/lspconfig.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/home-manager/neovim/lspconfig.lua b/home-manager/neovim/lspconfig.lua index 0ece084..539f605 100644 --- a/home-manager/neovim/lspconfig.lua +++ b/home-manager/neovim/lspconfig.lua @@ -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" },