barbar.nvim
barbar.nvim copied to clipboard
barbar causes redraw on startup which removes startup screen
Description After I updated barbar to master, whenever I open neovim, I see the startup screen flash and then disappear. I was able to bisect the history to determine https://github.com/romgrk/barbar.nvim/commit/d0b39de8ce48e9efced88edc9244ca21e571bb98 is where this issue starts from. I have been able to make a temporary fix by disabling icons with the viml setup variable. It does not work if I disable icons in lua setup which I guess is because of the auto setup. Nevertheless, this fix requires turning icons off which I would like to avoid.
To Reproduce init.lua:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.opt.rtp:prepend(lazypath)
-- vim.g.bufferline = {icons=false} -- uncommenting this line fixes issue but disables icons
require("lazy").setup({
{
'romgrk/barbar.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" },
},
})
Steps to reproduce the behavior:
- Launch neovim
- Startup screen flashes on the screen and disappears
- Disable icons with
vim.g.bufferline = {icons=false} - Startup screen appears and stays
Screenshots If applicable, add screenshots to help explain your problem or to capture error messages.
Information Neovim version: 0.8.1
@romgrk do we care about fixing this? Half of the plugins I use clear the startup screen; I haven't seen it in so long I forgot what it looked like.
If it was clearing a startup screen from a plugin I'd be concerned, but the Nvim startup screen doesn't have interactivity.
It does not work if I disable icons in lua setup which I guess is because of the auto setup
Related: #431, #438
I also haven't seen it in forever. My approach for many of these issues is, if someone has time & interest and provides a good PR I'm fine with merging, but I won't fix this myself.
For what it's worth, this bug seems to also overwrite the "greeter" shown by alpha-nvim which seems to be well liked.
For what it's worth, this bug seems to also overwrite the "greeter" shown by alpha-nvim which seems to be well liked.
Does vim.defer(_fn) fix that?
I think some combination of the newest versions of nvim, barbar, and alpha-nvim play nicely. I'm now seeing that if I run nvim as a command with no arguments, the alpha-nvim splash screen appears, but when I run with a file argument it opens directly in a barbar tab, and with a directory argument it opens with the file tree sidebar -- desired/expected behavior.
I don't know if that addresses the original issue as written, but certainly makes my comment obsolete.
Sorry this took me so long to reply. I'm still quite the nvim/lua novice, so my investigation was slow.
With that information and the discussion above, I think we can close this issue. If someone wants to submit a fix that makes the startup screen appear, feel free to send a PR.