heirline.nvim
heirline.nvim copied to clipboard
Winbar problem with Neogit
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.
perhaps try to debug this by printing out the buftype and/or putting a print statement into the if
statement