nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.82k stars 462 forks source link

Bug: lualine dissapears when winbar is enabled on NvimTree file creation #948

Open onsails opened 1 year ago

onsails commented 1 year ago

Self Checks

How to reproduce the problem

I've noticed that my lualine dissapears every time I create a file via NvimTree. Traced it back to the following conditions:

lualine should have winbar configured:

require('lualine').setup {
  winbar = {
    lualine_a = {
      { 'filename' },
    },
  },
}

nvim-tree should be enabled:

require 'nvim-tree'.setup {}

nvim-notify should be enabled as default notification provider

vim.notify = require("notify")
  1. Open tree NvimTreeOpen
  2. Create or delete some file
  3. Move to the buffer
image

Here is the screenshot before file manipulations

image

Minimal config to reproduce the issue

call plug#begin("/home/wb/dev/repro/.local/share/nvim/plugged")
" Your plugins go here like
Plug 'nvim-lualine/lualine.nvim'
Plug 'nvim-tree/nvim-tree.lua'
Plug 'rcarriga/nvim-notify'

call plug#end()

" Your Viml part of config goes here
" colorscheme onedark

lua << END
-- Your lua part of config goes here
require'lualine'.setup {
  winbar = {
    lualine_a = {
      { 'filename' },
    },
  },
}
require 'nvim-tree'.setup {}
vim.notify = require("notify")

END

Additional information

samhed commented 1 year ago

I have a similar issue. When winbar is enabled in lualine, each time I make a git commit using fugitive, lualine disappears.

My winbar config is simple:

  winbar = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = {},
    lualine_x = {'filetype'},
    lualine_y = {'filename'},
    lualine_z = {}
  },
  inactive_winbar = {},

If I disable winbar, I don't have any issues at all.

samhed commented 7 months ago

Hm, I can no longer reproduce the issue with winbar enabled. The lualine does not disappear after creating a git commit via fugitive. @onsails are you still seeing issues when using NvimTree?

onsails commented 7 months ago

Sorry can't test it, switched back to emacs