Closed BigJayToDaIzo closed 3 weeks ago
Thanks for the bug report! This looks like an interesting adventure to be sure...
I tried your settings out but wasn't able to reproduce this on wezterm. Maybe it's terminal specific, but I would like to rule out any chance of conflicting plugins first.
Could you follow the instructions here to create a minimal reproduction? https://github.com/mikavilpas/yazi.nvim/blob/main/documentation/reproducing-issues.md
Minimal Repro steps:
nvim -u ~/Downloads/repro.lua -c "lua require('lazy').update()"
yazi_floating_window_winblend = 20
(or 25) in opts blockThe only change I made to the repro.lua was enabling that single feature. No other plugins were loaded. If I could get wezterm to work on my box I'd test it, and I'm happy to test any other terminals (Wayland friendly) if it will help. Heck I've got half a mind to jump over into AwesomeWM and see how things are on X. (And will if you want to deep dive this)
As directed, my repro.lua
-- You can use this file to reproduce an issue with your configuration.
---@module "yazi"
---@module "lazy"
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify('./.repro', ':p')
-- set stdpaths to use .repro
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end
-- bootstrap lazy
local lazypath = root .. '/plugins/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
vim.g.mapleader = ' '
-- install the following plugins
---@type LazySpec
local plugins = {
'folke/tokyonight.nvim',
{
'mikavilpas/yazi.nvim',
event = 'VeryLazy',
keys = {
{
-- 👇 choose your own keymapping
'<leader>fy',
function()
require('yazi').yazi()
end,
{ desc = 'Open the file manager' },
},
},
---@type YaziConfig
opts = {
open_for_directories = false,
yazi_floating_window_winblend = 20,
},
},
}
require('lazy').setup(plugins, {
root = root .. '/plugins',
})
vim.cmd.colorscheme('tokyonight')
-- add anything e
Have a fantastic weekend!
Do you think the kitty issue might be this? https://yazi-rs.github.io/docs/faq#why-icons-shrink
Looks like the recommendation/workaround is to use a flavor. Can you test this out?
If you're currently not using a flavor, there is an example of the change you need to make here https://github.com/mikavilpas/dotfiles/commit/abbf921f5c85087da7e272f7f1dce5f26ab97c91
basically it's just installing the flavor and then configuring yazi to use it.
For reference, I think the issue that was mentioned might have been this https://github.com/sxyazi/yazi/issues/906 and this comment specifically https://github.com/sxyazi/yazi/issues/906#issuecomment-2076696877
This does not seem to solve the problem for me.
If you'll remember I tried this in foot, kitty & Alacritty. Alacritty was also exhibiting a slight variation of the oddity. Refactoring from a theme to a flavor sadly did not seem to make any changes/fix.
Added the following table to my yazi.lua neovim plugin:
{
"yazi-rs/flavors",
name = "yazi-flavor-catppuccin-macchiato",
lazy = true,
build = function(spec)
require("yazi.plugin").build_flavor(spec, {
sub_dir = "catppuccin-macchiato.yazi",
})
end,
},
Pointed my yazi.toml away from theme and onto flavor. I won't bore you with that diff. The colors and appearance changed from my everforest theme to catppuccin so I know it hooked up but the icons falter when yazi_floating_window_winblend = 15
(or other arbitrary integers around 15)
New interesting thing!
This is an oil floating window, with winblend enabled.
Notice the exact same issue? I do.
AKA this happens as well with yazi and yazi.nvim completely removed from the scenario.
That's very interesting indeed. I looked at the oil.nvim repo as well as neovim's repo, but couldn't find any leads in about 20 minutes of investigation.
It might be some neovim bug, but I'm not really sure. Kind of out of ideas.
That's very interesting indeed. I looked at the oil.nvim repo as well as neovim's repo, but couldn't find any leads in about 20 minutes of investigation.
It might be some neovim bug, but I'm not really sure. Kind of out of ideas.
Yeah that's why I wanted to get you the update. I don't think it's ANYTHING within your control as a plugin developer OR a yazi user. Looks like any winblend with icons in the ecosystem seems to behave the same way.
When enabling this configuration point yazi behaves oddly with icons that are wider than monospace allows. I've tested this in kitty and alacritty. Both behave slightly differently.
My yazi.nvim
I doubt this has any effect, but my plugin list is rather small and fully curated by myself. Not a bulky distro like NVChad or LazyVIM.
In kitty:![image](https://github.com/mikavilpas/yazi.nvim/assets/13368640/ad7c1599-2f7f-4628-ac1d-99e0950c3ffc)
Kitty is broken by making the icons with text behind the overflow, half sized so there is no overflow. Kitty resumes normally after disabling.
In Alacritty:
![image](https://github.com/mikavilpas/yazi.nvim/assets/13368640/a4fcdc4f-8959-4e36-866f-61bb19de6832)
As you can see, it behaves differently because the right portion of icons that have text behind them allow the text to bleed through as though the far right end of the icon is transparent, or the 'bg color'.![image](https://github.com/mikavilpas/yazi.nvim/assets/13368640/874519fa-afff-4ea8-92fa-16a9b4d14bec)
Alacritty also resumes normal behavior after commenting.
This behavior does not exist outside the confines of neovim loading the plugin. There are no transparency options (I'm aware of) so raw terminal instances of Yazi both in Zellij and outside the influence of a muxer behave normally.
In terms of where to begin looking, this interesting comment was made on the Yazi discord that may explain this:![image](https://github.com/mikavilpas/yazi.nvim/assets/13368640/1523adab-0cdd-4bb2-a1d7-1f9e2c3c0512)
EDIT/UPDATE: Installed Foot terminal and it works beautifully with the feature enabled:![image](https://github.com/mikavilpas/yazi.nvim/assets/13368640/93e29de6-e08b-4411-ba5b-313329441c0e)
If you'd like a minimal reproduction, please point me at exactly what that entails and I'll get it done for you.
Thank you for the exceedingly handy plugin!