rebelot / heirline.nvim

Heirline.nvim is a no-nonsense Neovim Statusline plugin designed around recursive inheritance to be exceptionally fast and versatile.
MIT License
1.01k stars 41 forks source link

Winbar problem with Neogit #69

Open anuvyklack opened 1 year ago

anuvyklack commented 1 year ago

I have next autocommand set in my config:

vim.api.nvim_create_autocmd('User', { pattern = 'HeirlineInitWinbar',
   callback = function(args)
      local buf = args.buf
      local buftype = vim.tbl_contains(
         { 'prompt', 'nofile', 'help', 'quickfix' },
         bo[buf].buftype
      )
      local filetype = vim.tbl_contains(
         {
            'gitcommit', 'fugitive',
            'NeogitStatus', 'NeogitPopup', 'NeogitCommitMessage',
         },
         bo[buf].filetype
      )
      if buftype or filetype then
         vim.opt_local.winbar = nil
      end
   end
})

And all Neogit buffers have buftype set to nofile, but when I open any Neogit window, I always have winbar active.

max397574 commented 1 year ago

perhaps try to debug this by printing out the buftype and/or putting a print statement into the if statement