refactor(nvim): use buf_matches for heirline winbar disable

This commit is contained in:
Price Hiller 2024-03-04 13:37:21 -06:00
parent 0cd626e0f6
commit 635e9f31cc
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -1059,21 +1059,9 @@ 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.*",
"no-neck-pain",
})
if #matches > 0 then
return false
end
end
return conditions.buffer_matches({
buftype = { "nofile", "prompt", "quickfix", "terminal" },
filetype = { "^git.*", "fugitive", "Trouble", "dashboard" },
filetype = { "^git.*", "fugitive", "Trouble", "dashboard", ".*neogit.*", "no-neck-pain" },
}, args.buf)
end,
},