nvim-tree / nvim-web-devicons

lua `fork` of vim-web-devicons for neovim
MIT License
1.93k stars 183 forks source link

bug: OptionSet autocommand is clearing the Neovim intro screen #355

Closed mikesmithgh closed 6 months ago

mikesmithgh commented 6 months ago

Steps to reproduce

require("lazy").setup({ "nvim-tree/nvim-web-devicons", enabled = true, lazy = false, config = function() require("nvim-web-devicons").setup() end, })


- `export NVIM_APPNAME=deviconsnvim`
- open `nvim`
- lazy.nvim will install nvim-web-devicons
- close `nvim`
- open `nvim`

### Expected
You should see the neovim intro screen

### Actual
You see a blank buffer

## Notes
I performed a git bisect to find the commit that introduced this issue.

commit e283ab937e0197b37ec5d8013e49495193407324 added the `OptionSet` autocommand https://github.com/nvim-tree/nvim-web-devicons/blob/master/lua/nvim-web-devicons.lua#L499

When `set_up_highlights(true)` executes, the intro screen is cleared.

## Demo

https://github.com/nvim-tree/nvim-web-devicons/assets/10135646/fef0ca3f-49ac-475c-8d91-805f6902e8a3
gegoune commented 6 months ago

I tried to reproduce and realised that I am not getting intro screen even with nvim --clean on v0.10.0-dev-1881+g6abdc1ac1-Homebrew.

mikesmithgh commented 6 months ago

@gegoune hmm.. I just tested nvim v0.9.4 and cannot reproduce either. Maybe this is an issue on nightly then. I'll pull latest and report to Neovim core if it is still happening.

mikesmithgh commented 6 months ago

@gegoune I reported to Neovim https://github.com/neovim/neovim/issues/26677. Thanks for taking a look, feel free to close this issue if you want.