From 51727a129ce8e6eb1d3fc3923c95074b7b9ff714 Mon Sep 17 00:00:00 2001 From: ray-x Date: Wed, 28 Dec 2022 16:16:17 +1100 Subject: [PATCH] =?UTF-8?q?icons=20option=20for=20sign=20col=20?= =?UTF-8?q?=F0=9F=8E=84=F0=9F=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/navigator/lspclient/highlight.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lua/navigator/lspclient/highlight.lua b/lua/navigator/lspclient/highlight.lua index 3296682..7a8e591 100644 --- a/lua/navigator/lspclient/highlight.lua +++ b/lua/navigator/lspclient/highlight.lua @@ -19,18 +19,17 @@ function M.diagnositc_config_sign() vim.fn.sign_define(sign_name, { text = icons.code_lens_action_icon, texthl = 'LspDiagnosticsSignHint' }) end - if not icons.icons then - return - end - local e, w, i, h = icons.diagnostic_err, icons.diagnostic_warn, icons.diagnostic_info, icons.diagnostic_hint - local t = vim.fn.sign_getdefined('DiagnosticSignWarn') - if vim.tbl_isempty(t) or t[1].text == 'W ' then - vim.fn.sign_define('DiagnosticSignError', { text = e, texthl = 'DiagnosticError', linehl = '', numhl = '' }) - vim.fn.sign_define('DiagnosticSignWarn', { text = w, texthl = 'DiagnosticWarn', linehl = '', numhl = '' }) - vim.fn.sign_define('DiagnosticSignInfo', { text = i, texthl = 'DiagnosticInfo', linehl = '', numhl = '' }) - vim.fn.sign_define('DiagnosticSignHint', { text = h, texthl = 'DiagnosticHint', linehl = '', numhl = '' }) + if icons.icons then + local e, w, i, h = icons.diagnostic_err, icons.diagnostic_warn, icons.diagnostic_info, icons.diagnostic_hint + local t = vim.fn.sign_getdefined('DiagnosticSignWarn') + if vim.tbl_isempty(t) or t[1].text == 'W ' then + vim.fn.sign_define('DiagnosticSignError', { text = e, texthl = 'DiagnosticError', linehl = '', numhl = '' }) + vim.fn.sign_define('DiagnosticSignWarn', { text = w, texthl = 'DiagnosticWarn', linehl = '', numhl = '' }) + vim.fn.sign_define('DiagnosticSignInfo', { text = i, texthl = 'DiagnosticInfo', linehl = '', numhl = '' }) + vim.fn.sign_define('DiagnosticSignHint', { text = h, texthl = 'DiagnosticHint', linehl = '', numhl = '' }) - t = vim.fn.sign_getdefined('DiagnosticSignWarn') + t = vim.fn.sign_getdefined('DiagnosticSignWarn') + end end M.configed = true end