diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index a867711..5f7ade6 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -397,10 +397,10 @@ use({ config = function() require("notify").setup({ icons = { - ERROR = "🔥", - WARN = "⚠️", - DEBUG = "🤔", - INFO = "*", + ERROR = utils.diagnostic_signs.Error, + WARN = utils.diagnostic_signs.Warn, + DEBUG = utils.diagnostic_signs.Hint, + INFO = utils.diagnostic_signs.Info, }, }) vim.notify = require("notify") diff --git a/neovim/lua/plugins/lsp.lua b/neovim/lua/plugins/lsp.lua index d2452a1..1b3ecf8 100644 --- a/neovim/lua/plugins/lsp.lua +++ b/neovim/lua/plugins/lsp.lua @@ -21,22 +21,7 @@ function M.config_lsp_ui() end -- Diagnostics signs - local signs = { - Error = "🔥", - Warn = "⚠️", - Hint = "🤔", - Info = "➞", - } - - -- Don't use emoji for Kitty - if vim.env["TERM"] == "xterm-kitty" then - signs = { - Error = "!!", - Warn = "!", - Hint = "?", - Info = "i", - } - end + local signs = utils.diagnostic_signs for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type @@ -217,9 +202,9 @@ end function M.config_lsp_saga() utils.try_require("lspsaga", function(saga) saga.init_lsp_saga({ - error_sign = "🔥", - warn_sign = "⚠️", - hint_sign = "🤔", + error_sign = utils.diagnostic_signs.Error, + warn_sign = utils.diagnostic_signs.Warn, + hint_sign = utils.diagnostic_signs.Hint, dianostic_header_icon = " 💬 ", code_action_icon = "💡", code_action_prompt = { diff --git a/neovim/lua/plugins/todo.lua b/neovim/lua/plugins/todo.lua index 24fd8ae..4f3a045 100644 --- a/neovim/lua/plugins/todo.lua +++ b/neovim/lua/plugins/todo.lua @@ -1,3 +1,5 @@ +local utils = require("utils") + require("todo-comments").setup({ signs = false, keywords = { @@ -5,7 +7,7 @@ require("todo-comments").setup({ icon = "🩹", }, TODO = { - icon = "✏️", + icon = utils.diagnostic_signs.Pencil, }, HACK = { icon = "🙈", @@ -17,7 +19,7 @@ require("todo-comments").setup({ icon = "📓", }, WARNING = { - icon = "⚠️", + icon = utils.diagnostic_signs.Warn, }, }, }) diff --git a/neovim/lua/utils.lua b/neovim/lua/utils.lua index 6b39d47..8cd1bd0 100644 --- a/neovim/lua/utils.lua +++ b/neovim/lua/utils.lua @@ -226,4 +226,24 @@ function M.keymap_group(mode, prefix, opts, bufnr) end end +-- Diagnostics signs +M.diagnostic_signs = { + Error = "🔥", + Warn = "⚠️", + Hint = "🤔", + Info = "➞", + Pencil = "✏️", +} + +-- Don't use emoji for Kitty +if vim.env["TERM"] == "xterm-kitty" then + M.diagnostic_signs = { + Error = "🔥", + Warn = "⚠", + Hint = "🤔", + Info = "i", + Pencil = "✎", + } +end + return M