icons option for sign col 🎄🎆

pull/268/head
ray-x 2 years ago
parent c75914f7f6
commit 51727a129c

@ -19,18 +19,17 @@ function M.diagnositc_config_sign()
vim.fn.sign_define(sign_name, { text = icons.code_lens_action_icon, texthl = 'LspDiagnosticsSignHint' }) vim.fn.sign_define(sign_name, { text = icons.code_lens_action_icon, texthl = 'LspDiagnosticsSignHint' })
end end
if not icons.icons then if icons.icons then
return local e, w, i, h = icons.diagnostic_err, icons.diagnostic_warn, icons.diagnostic_info, icons.diagnostic_hint
end local t = vim.fn.sign_getdefined('DiagnosticSignWarn')
local e, w, i, h = icons.diagnostic_err, icons.diagnostic_warn, icons.diagnostic_info, icons.diagnostic_hint if vim.tbl_isempty(t) or t[1].text == 'W ' then
local t = vim.fn.sign_getdefined('DiagnosticSignWarn') vim.fn.sign_define('DiagnosticSignError', { text = e, texthl = 'DiagnosticError', linehl = '', numhl = '' })
if vim.tbl_isempty(t) or t[1].text == 'W ' then vim.fn.sign_define('DiagnosticSignWarn', { text = w, texthl = 'DiagnosticWarn', linehl = '', numhl = '' })
vim.fn.sign_define('DiagnosticSignError', { text = e, texthl = 'DiagnosticError', linehl = '', numhl = '' }) vim.fn.sign_define('DiagnosticSignInfo', { text = i, texthl = 'DiagnosticInfo', linehl = '', numhl = '' })
vim.fn.sign_define('DiagnosticSignWarn', { text = w, texthl = 'DiagnosticWarn', linehl = '', numhl = '' }) vim.fn.sign_define('DiagnosticSignHint', { text = h, texthl = 'DiagnosticHint', 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 end
M.configed = true M.configed = true
end end

Loading…
Cancel
Save