folke / snacks.nvim

🍿 A collection of small QoL plugins for Neovim
Apache License 2.0
944 stars 15 forks source link

bug: Snacks dashboard does not open on startup #98

Closed rachartier closed 37 minutes ago

rachartier commented 2 hours ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.11.0-dev-1172+gf164e1e35c

Operating system/version

WSL2 Ubuntu 22.04

Describe the bug

Hello,

The dashboard plugin looks really neat, well done !

Unfortunately, I'm experiencing the same issue as a user on Reddit: I can't get "dashboard" to open at startup.
I tried disabling plugins and changing the priority, but it still won't work.
I can open it using Snacks.dashboard() in a popup.

It's not a simple case to reproduce with the "repro.lua" file because it doesn't appear either due to the plugin setup.
Here is where you can find Snacks in my config: https://github.com/rachartier/dotfiles/blob/main/.config/nvim/lua/plugins/utils/snacks.lua

Steps To Reproduce

Open nvim

Expected Behavior

Having dashboard open at start

Repro

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

require("lazy.minit").repro({
  spec = {
    { "folke/snacks.nvim", opts = {} },
    -- add any other plugins here
  },
})
rachartier commented 2 hours ago

Ah my bad, another issue (#97) was created when I was writing this one.

folke commented 1 hour ago

Can you update snacks, run :checkhealth snacks and report back with the output? Just added a bunch of health checks to narrow down the issue

rachartier commented 1 hour ago

Ah nice! stdin is a pipe: image

But I don't know why. I do not have any alias on nvim, nor doing anything strange with it

rachartier commented 1 hour ago

I'm also using tmux and zsh. But I tried without tmux and with bash, same thing

For info, in an instance of neovim:

print(vim.uv.guess_handle(0)) -- tty     stdout
print(vim.uv.guess_handle(1)) -- tty     stdin
print(vim.uv.guess_handle(2)) -- tty     stderr
print(vim.uv.guess_handle(3)) -- pipe    ?
folke commented 37 minutes ago

something is wrong in my pipe detection. Will work on a fix. Closing in favor of that other issue.

folke commented 30 minutes ago

Are you using bob-nvim by any chance?

rachartier commented 19 minutes ago

I've commented on the other issue, but no. I do use the appimage however.

folke commented 5 minutes ago

What I was doing was just not correct. I misread the docs on stdin-startup. Apparently that section was for GUIs that embed Neovim.

Either way, I think I now found a proper way to check for piped stdin.

Would be great if you could confirm!