bug: window.backdrop option is ignored
Did you check docs and existing issues?
- [X] I have read all the zen-mode.nvim docs
- [X] I have searched the existing issues of zen-mode.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.4
Operating system/version
MacOS 14.2.1
Describe the bug
When commit c1dea35 added default to the highlight command that sets the background color (here), it caused the window.backdrop parameter to be ignored, as zen-mode.setup is called first without a user config, which sets the default highlight, meaning that when the user calls setup, the highlight group has already been defined, and the value for window.backdrop is ignored.
Steps To Reproduce
:lua require("zen-mode").setup({window = {backdrop = 1}}):ZenMode
Expected Behavior
the window backdrop should respect the configuration file
Repro
-- 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)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"folke/zen-mode.nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I still getting this issue, plugin version is v1.4.0, packer.lua:
use { "folke/zen-mode.nvim", tag = "v1.4.0" }
@tymbaca Not sure if you're seeing the same thing I'm seeing, but at least in my case, the problem was my EndOfBuffer coloring was showing in the backdrop. I adjusted my colorscheme to avoid the issue, but I also sent a proposed fix here:
- https://github.com/folke/zen-mode.nvim/pull/156