Fix LSP diagnostic icons

This commit is contained in:
Deneir Uy 2021-12-07 16:19:31 +08:00 committed by siduck
parent 03d55e94a4
commit 97572ee1bb
1 changed files with 5 additions and 4 deletions

View File

@ -106,13 +106,14 @@ end
M.lsp_handlers = function() M.lsp_handlers = function()
local function lspSymbol(name, icon) 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 end
lspSymbol("Error", "") lspSymbol("Error", "")
lspSymbol("Information", "") lspSymbol("Info", "")
lspSymbol("Hint", "") lspSymbol("Hint", "")
lspSymbol("Warning", "") lspSymbol("Warn", "")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = { virtual_text = {