refactor(nvim): use buf_matches for heirline winbar disable
This commit is contained in:
parent
0cd626e0f6
commit
635e9f31cc
@ -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,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user