From 97572ee1bb2459caaf539812969e5560cdeae5ac Mon Sep 17 00:00:00 2001 From: Deneir Uy Date: Tue, 7 Dec 2021 16:19:31 +0800 Subject: [PATCH] Fix LSP diagnostic icons --- lua/plugins/configs/others.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 310118f7..5a851cc2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -106,13 +106,14 @@ end M.lsp_handlers = function() local function lspSymbol(name, icon) - vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) + local hl = "DiagnosticSign" .. name + vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl }) end lspSymbol("Error", "") - lspSymbol("Information", "") - lspSymbol("Hint", "") - lspSymbol("Warning", "") + lspSymbol("Info", "") + lspSymbol("Hint", "") + lspSymbol("Warn", "") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = {