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.05k stars 40 forks source link

Winbar problem with Neogit #69

Open anuvyklack opened 2 years ago

anuvyklack commented 2 years 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 2 years ago

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