-
Notifications
You must be signed in to change notification settings - Fork 219
Description
Is your feature request related to a problem? Please describe.
Modern terminal emulators support feature for wide grapheme clusters: it means that icons are displayed a bit bigger than regular text characters. The problem is that when using neovim's vim.o.pumblend, the icons become mismatched in size (due to characters beneath). Here is a screenshot:

Describe the solution you'd like
The fix is very simple - just add { blend = 0 } to nvim_set_hl
like this
nvim_set_hl(0, get_highlight_name(icon_data), {
fg = icon_data.color,
ctermfg = tonumber(icon_data.cterm_color),
blend = 0,
})
With this small change all icons are beautifully aligned:

Describe alternatives you've considered
Currently I have this in my nvim config to bypass set_hl
{
"nvim-tree/nvim-web-devicons",
config = function()
local function opaque_icons()
local devicons = require("nvim-web-devicons")
devicons.setup({})
local icons = devicons.get_icons()
for _, opts in pairs(icons) do
local hl = "DevIcon" .. opts.name
vim.cmd(("highlight %s blend=0"):format(hl))
end
end
vim.schedule(opaque_icons)
vim.api.nvim_create_autocmd("ColorScheme", { callback = vim.schedule_wrap(opaque_icons) })
end,
},
Metadata
Metadata
Assignees
Labels
No labels