folke / snacks.nvim

🍿 A collection of small QoL plugins for Neovim
Apache License 2.0
1.08k stars 17 forks source link

bug: Snacks dashboard can't run command chafa in nushell and pwsh (cmd work fine) #119

Closed DwcksDinh closed 6 hours ago

DwcksDinh commented 6 hours ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10.1

Operating system/version

Windows 11

Describe the bug

I have updated newest lazyvim with snacks dashboard and use chafa to show image in dashboard, it didn't work if set vim.o.shell = "pwsh" or vim.o.shell = "nu" at first times:

Output: [?25lError:nu::shell::file_not_found×File not found ╭─[source:1:1] 1 │ nu ·▲ · ╰── Could not access file '/s': The system cannot find the file specified. (os error 2) ╰────]0;C:\Users\corcl\AppData\Local\Programs\nu\bin\nu.exe[?25h


But if i set `vim.o.shell = "cmd"` it work:
- cmd:
![image](https://github.com/user-attachments/assets/a6c9088c-675c-482a-b3ae-4680c62ed3d0)
Then i change `vim.o.shell = "nu"` dashboard now can show image:
![image](https://github.com/user-attachments/assets/96d367f8-ddaf-4ea0-a3eb-9e9156308d41)

I don't know why, it happen every time when i open terminal.

### Steps To Reproduce

1. Update lazyvim
2. Change dashboard config using chafa cmd
3. It has error when set vim.o.shell = "nu"

### Expected Behavior

Can show image at dashboard while using nushell or powershell 

### Repro

```lua
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
  },
})
folke commented 6 hours ago

Check the Neovim docs on how to setup pwsh. Not a snacks issue