Skip to content

Commit f2d6676

Browse files
committed
Change icons based on some terms that won't render double width unicode
1 parent 1dff2e9 commit f2d6676

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

neovim/lua/icons.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@ function M.init()
1212
closed = "",
1313
}
1414

15+
-- Terms that bug out on double-width unicode characters
16+
local known_bad_terms = {
17+
["xterm-kitty"] = true,
18+
["screen"] = true,
19+
["screen-256color"] = true,
20+
["xterm-256color"] = true,
21+
}
22+
local current_term = vim.env["TERM"] or "unknown"
23+
1524
-- Diagnostics signs
16-
if vim.env["TERM"] == "xterm-kitty" then
25+
if known_bad_terms[current_term] ~= nil then
1726
-- Don't use double width emoji for Kitty
1827
M.diagnostic_signs = {
1928
Error = "🔥",
@@ -42,7 +51,7 @@ function M.init()
4251
}
4352

4453
-- Debug control icons
45-
if vim.env["TERM"] == "xterm-kitty" then
54+
if known_bad_terms[current_term] ~= nil then
4655
-- Don't use double width emoji for Kitty
4756
M.debug_control_icons = {
4857
disconnect = "",

0 commit comments

Comments
 (0)