fix(nvim): allow excluded filetype matches for heirline winbar disable

This commit is contained in:
Price Hiller 2023-10-07 23:22:32 -05:00
parent 4d7e02f29a
commit d34965715a
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -1022,6 +1022,20 @@ return {
},
opts = {
disable_winbar_cb = function(args)
if args.event == "FileType" then
local ft = args.match
local matches = vim.tbl_filter(
function(excluded_ft)
return ft:lower():find(excluded_ft) ~= nil
end,
{
".*neogit.*"
}
)
if #matches > 0 then
return false
end
end
return conditions.buffer_matches({
buftype = { "nofile", "prompt", "quickfix", "terminal" },
filetype = { "^git.*", "fugitive", "Trouble", "dashboard" },