snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

bug: dashboard can't open other windows

Open msdone-lwt opened this issue 8 months ago • 4 comments

Did you check docs and existing issues?

  • [x] I have read all the snacks.nvim docs
  • [x] I have updated the plugin to the latest version before submitting this issue
  • [x] I have searched the existing issues of snacks.nvim
  • [x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.11.0

Operating system/version

WSL 2

Describe the bug

On the snacks_dashboard page, you can open neotree and manipulate neotree, but no neotree page is shown, other plugins with ui pages also have this problem, such as avante.nvim

https://github.com/user-attachments/assets/97e1a9e7-dcdf-4071-b45a-ccc9d305b7e9

Steps To Reproduce

  1. Edit repro.lua
  2. h -> dashboard
  3. e ->neotree

Expected Behavior

Plugins such as neotree can be used normally

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

vim.g.mapleader = " "
vim.g.maplocalleader = " "

require("lazy.minit").repro({
	spec = {
		{
			"folke/snacks.nvim",
			opts = {
				dashboard = {
					preset = {
						header = "test",
					},
				},
			},
		},
		-- add any other plugins here
		{
			"nvim-neo-tree/neo-tree.nvim",
			branch = "v3.x",
			dependencies = {
				"nvim-lua/plenary.nvim",
				"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
				"MunifTanjim/nui.nvim",
				-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
			},
		},
	},
})

vim.api.nvim_create_autocmd("VimEnter", {
  callback = function()
    vim.keymap.set("n", "<leader>e", ":Neotree toggle<CR>", { noremap = true, silent = true, desc = "Toggle NeoTree" })
    vim.keymap.set("n", "<leader>h", function()
      require("snacks").dashboard.open()
    end, { noremap = true, silent = true, desc = "Open Snacks Dashboard" })
  end,
})

msdone-lwt avatar Apr 24 '25 10:04 msdone-lwt

That's because the Dashboard is actually a floating window with zindex = 10 and that shows above the other normal windows.

dpetka2001 avatar Apr 25 '25 09:04 dpetka2001

So the question is insoluble?

msdone-lwt avatar Apr 27 '25 00:04 msdone-lwt

Maybe the maintainer has a better solution. But with my limited knowledge this would require a redesign of Snacks windows and that's up to the maintainer if he wants to implement or not.

dpetka2001 avatar Apr 27 '25 07:04 dpetka2001

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[bot] avatar May 28 '25 02:05 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jun 04 '25 02:06 github-actions[bot]