From d34965715a1dd651a710e31a6208949b101a7b42 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 7 Oct 2023 23:22:32 -0500 Subject: [PATCH] fix(nvim): allow excluded filetype matches for heirline winbar disable --- dots/.config/nvim/lua/plugins/configs/heirline.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dots/.config/nvim/lua/plugins/configs/heirline.lua b/dots/.config/nvim/lua/plugins/configs/heirline.lua index 5f83abb6..7711a327 100644 --- a/dots/.config/nvim/lua/plugins/configs/heirline.lua +++ b/dots/.config/nvim/lua/plugins/configs/heirline.lua @@ -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" },