heirline.nvim icon indicating copy to clipboard operation
heirline.nvim copied to clipboard

Winbar problem with Neogit

Open anuvyklack opened this issue 1 year ago • 1 comments

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.

anuvyklack avatar Oct 06 '22 22:10 anuvyklack

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

max397574 avatar Oct 12 '22 11:10 max397574