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() config = function()
require("notify").setup({ require("notify").setup({
icons = { icons = {
ERROR = "🔥", ERROR = utils.diagnostic_signs.Error,
WARN = "⚠️", WARN = utils.diagnostic_signs.Warn,
DEBUG = "🤔", DEBUG = utils.diagnostic_signs.Hint,
INFO = "*", INFO = utils.diagnostic_signs.Info,
}, },
}) })
vim.notify = require("notify") vim.notify = require("notify")

View File

@ -21,22 +21,7 @@ function M.config_lsp_ui()
end end
-- Diagnostics signs -- Diagnostics signs
local signs = { local signs = utils.diagnostic_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
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = "DiagnosticSign" .. type
@ -217,9 +202,9 @@ end
function M.config_lsp_saga() function M.config_lsp_saga()
utils.try_require("lspsaga", function(saga) utils.try_require("lspsaga", function(saga)
saga.init_lsp_saga({ saga.init_lsp_saga({
error_sign = "🔥", error_sign = utils.diagnostic_signs.Error,
warn_sign = "⚠️", warn_sign = utils.diagnostic_signs.Warn,
hint_sign = "🤔", hint_sign = utils.diagnostic_signs.Hint,
dianostic_header_icon = " 💬 ", dianostic_header_icon = " 💬 ",
code_action_icon = "💡", code_action_icon = "💡",
code_action_prompt = { code_action_prompt = {

View File

@ -1,3 +1,5 @@
local utils = require("utils")
require("todo-comments").setup({ require("todo-comments").setup({
signs = false, signs = false,
keywords = { keywords = {
@ -5,7 +7,7 @@ require("todo-comments").setup({
icon = "🩹", icon = "🩹",
}, },
TODO = { TODO = {
icon = "✏️", icon = utils.diagnostic_signs.Pencil,
}, },
HACK = { HACK = {
icon = "🙈", icon = "🙈",
@ -17,7 +19,7 @@ require("todo-comments").setup({
icon = "📓", icon = "📓",
}, },
WARNING = { WARNING = {
icon = "⚠️", icon = utils.diagnostic_signs.Warn,
}, },
}, },
}) })

View File

@ -226,4 +226,24 @@ function M.keymap_group(mode, prefix, opts, bufnr)
end end
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 return M