Update signs for kitty

This commit is contained in:
ViViDboarder 2022-08-31 12:09:15 -07:00
parent 89c4d40068
commit 8b6ae9a87a
4 changed files with 32 additions and 25 deletions

View File

@ -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")

View File

@ -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 = {

View File

@ -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,
},
},
})

View File

@ -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