From fec301504f03b4d8acfdb63471001aa5d30e38e9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Jul 2021 22:37:48 +0530 Subject: [PATCH] clean stuff --- lua/plugins/lspconfig.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 1804e46..8e94849 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -89,11 +89,15 @@ lspinstall.post_install_hook = function() vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server end --- replace the default lsp diagnostic letters with prettier symbols -vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) -vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) -vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) -vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) +-- replace the default lsp diagnostic symbols +function lspSymbol(name, icon) + vim.fn.sign_define("LspDiagnosticsSign" .. name, {text = icon, numhl = "LspDiagnosticsDefaul" .. name}) +end + +lspSymbol("Error", "") +lspSymbol("Warning", "") +lspSymbol("Information", "") +lspSymbol("Hint", "") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(