nvim-tree/nvim-web-devicons

bug: OptionSet autocommand is clearing the Neovim intro screen

mikesmithgh opened this issue · 3 comments

Steps to reproduce

  • mkdir -p ~/.config/deviconsnvim
  • create the file ~/.config/deviconsnvim/init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/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",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

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 e283ab9 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

reproduce-intro-issue-web-devicons.mov

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.

@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.

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