-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Transparency for yazi.nvim Floating Window #154
Comments
Thanks for the report, I'm not familiar with Yazi but it does look like a bug. Could you please share what everforest options are set in your config? |
return {
"sainnhe/everforest",
config = function()
vim.g.everforest_transparent_background = 2
vim.g.everforest_float_style = "dim"
vim.g.everforest_diagnostic_text_highlight = 1
vim.g.everforest_diagnostic_line_highlight = 1
vim.g.everforest_diagnostic_virtual_text = "highlighted"
vim.g.everforest_dim_inactive_windows = 1
vim.g.everforest_ui_contrast = "high"
vim.g.everforest_better_performans = 1
vim.cmd.colorscheme("everforest")
end
} |
I had a quick look at the highlight groups and I understand the problem: floating windows aren't affected by transparency, otherwise they would blend with the underlying window(s) and become unreadable. Wouldn't it be a better solution to style the Yazi background using a plain color from the Everforest palette, to make it look like other floating windows? You can try with If you really want to keep Yazi transparent, could you please try calling |
Worked as you said. Sorry I'm new on lua and nvim how can I make transparent default ? |
Your Neovim distribution might offer facilities for overriding highlights of particular colorschemes (AstroVim does, I'm not sure about LazyVim). The ones that do implement that feature using an autocommand, similarly to what's described in Everforest's documentation: Lines 616 to 621 in 7c4894b
In your case, you could add this to your vim.api.nvim_create_autocmd('ColorScheme', {
group = vim.api.nvim_create_augroup('custom_highlights_everforest', {}),
pattern = 'everforest',
callback = function()
-- Yazi borders. Match background of Yazi window, which is transparent.
vim.api.nvim_set_hl(0, 'YaziFloatBorder', { link = 'Grey' })
end
}) We could (and maybe should) add support for |
Thanks the command you provided works. I'm not sure if you need any inspiration but catpuccin also able to provide full transparency when I set the option transparent_background = true. I don't know maybe this situation can give some ideas to you. Thanks again. You already solved mu issue but since I think you want to follow for more. I'm not going to close this issue. Furthermore I use also blink for code completion and they are also not transparent. Since catpuccin can make transparent it too without any command. I don't know if you need to adapt everforest for every plugin or there is a general way. |
The fact that we don't make floating windows transparent was a design decision. I'm not sure whether we want to revisit that, for instance by introducing -- For completion menus like blink.cmp.
vim.api.nvim_set_hl(0, 'Pmenu', {})
-- For regular floating windows.
vim.api.nvim_set_hl(0, 'NormalFloat', {}) In Vimscript (e.g. on the command line), you can clear a highlight group with |
Hi,
Firstly thanks for this theme.
Can you provide transparent background for floating windows.
As you can see I have floating window as a file manager which is yazi and there is a bit ugly border around here. It's colors are assigned by nvim theme, right now it's everforest. Definitely it's not a bug but this is the reason why I'm here.
The text was updated successfully, but these errors were encountered: