fix(nvim): allow excluded filetype matches for heirline winbar disable
This commit is contained in:
parent
4d7e02f29a
commit
d34965715a
@ -1022,6 +1022,20 @@ return {
|
|||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
disable_winbar_cb = function(args)
|
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({
|
return conditions.buffer_matches({
|
||||||
buftype = { "nofile", "prompt", "quickfix", "terminal" },
|
buftype = { "nofile", "prompt", "quickfix", "terminal" },
|
||||||
filetype = { "^git.*", "fugitive", "Trouble", "dashboard" },
|
filetype = { "^git.*", "fugitive", "Trouble", "dashboard" },
|
||||||
|
Loading…
Reference in New Issue
Block a user