Skip to content
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

bug: window.backdrop option is ignored #115

Closed
3 tasks done
hneutr opened this issue Jan 23, 2024 · 1 comment · Fixed by #139
Closed
3 tasks done

bug: window.backdrop option is ignored #115

hneutr opened this issue Jan 23, 2024 · 1 comment · Fixed by #139
Labels
bug Something isn't working stale

Comments

@hneutr
Copy link

hneutr commented Jan 23, 2024

Did you check docs and existing issues?

  • I have read all the zen-mode.nvim docs
  • I have searched the existing issues of zen-mode.nvim
  • 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

  1. :lua require("zen-mode").setup({window = {backdrop = 1}})
  2. :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
Copy link
Contributor

github-actions bot commented Jul 6, 2024

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.

@github-actions github-actions bot added the stale label Jul 6, 2024
@folke folke closed this as completed in 6b4acad Jul 6, 2024
folke pushed a commit that referenced this issue Jul 7, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](v1.3.0...v1.4.0)
(2024-07-06)


### Features

* **border:** add border to main window
([#80](#80))
([a256eda](a256eda))
* **plugins:** add the ability to disable todo-comments.nvim in zen-mode
([#114](#114))
([c952f60](c952f60))
* **plugins:** implement Neovide plugin
([#131](#131))
([e6e83f6](e6e83f6))


### Bug Fixes

* add default to ZenBg to allow customization
([#108](#108))
([c1dea35](c1dea35))
* assign filetype to background buffer
([#91](#91))
([7175e4d](7175e4d))
* fixed opts.window.backdrop. Fixes
[#115](#115), Closes
[#119](#119)
([6b4acad](6b4acad))
* tmux+wezterm plugin
([#103](#103))
([3506220](3506220))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant