Closed bhaumik-tripathi closed 1 month ago
I'm trying to reproduce. This looks to me like an issue with another setting. Did you by any chance enable contrast for floating windows with floating_windows=true
?
Hey @marko-cerovac , floating_windows= true
was indeed enabled and on making it false the color difference goes away if nvim-notify
is uncommented in plugins
of material settings and the underlying file is on focus. I was not sure but now it seems like notify uses floating windows probably to render the notifications.
But, even after that if non_current_windows = true
is set the notification window is showing color diff if the underlying file is not in focus.
For better clarity afterwards these are the options I have tweaked.
{
terminal = false,
sidebars = true,
floating_windows = false,
cursor_line = true,
lsp_virtual_text = true,
non_current_windows = true,
}
Yes, nvim-notify notifications use floating window background because they are floating windows. If you uncomment nvim-notify
from your settings, you will also get this difference when the file is not in focus (the notifications will be lighter then the background). You can't get them to always have the same color as the background with the default settings. In part, that's because they shouldn't. The option to highlight non current windows is used to signify which window pane is in focus, but floating windows like notifications are a special case because they can't be focused on and neovim doesn't apply this background change to them. They just have one background color and that's it.
If you really really want them to always have the same background as the window behind them, you can do the following:
let colors = require('material').colors
BufWinEnter
that sets the nvim-notify background color to be colors.backgrounds.non_current_windows
BufWinLeave
that sets the nvim-notify background color to be colors.backgrounds.floating_windows
or colors.editor.bg
(depending on which color you want)The option to highlight non current windows is used to signify which window pane is in focus, but floating windows like notifications are a special case because they can't be focused on and neovim doesn't apply this background change to them.
Correct, I got your point, the current settings matches more with the philosophy and seems correct to me too. Thanks, for the clarification. Rather, As you suggested if I want I can also create a autocmd for that, but there is no issue with this setting too for me.
First of all, thank you for creating this awesome colorscheme, it's just perfect, as a scope of improvement there is some colour issues in notify's default config when enabled from this themes
setup
function.Steps to reproduce!
plugins
(make sure it is installed and in use for some notifications to test).non_current_windows = true
.nvim-notify
is commented inplugins
of setup.It is also important to note that if the underlying file is not in focus, the default background of notify is different from the color of non-focused file. So, I can say that the default background color of notify when
plugins = {'nvim-notify'}
is set insetup
corresponds to the dark background color of non focused files, also when the 2nd set is done, the lighter background which happens to show contrast creates the background color differences with the notification. I am not sure of the internal functionalities but you would somehow need to decide the background color depending if the underlying file is in focus or not if non_current_windows = true` is set.