diff --git a/lua/nxvim/plugins/ufo.lua b/lua/nxvim/plugins/ufo.lua index e019b1a..5258ff5 100644 --- a/lua/nxvim/plugins/ufo.lua +++ b/lua/nxvim/plugins/ufo.lua @@ -4,11 +4,6 @@ local ufo = require("ufo") -local ignored_filetypes = { "markdown", "git", "NeogitStatus" } -for _, key in ipairs(ignored_filetypes) do - ignored_filetypes[key] = true -end - ufo.setup({ open_fold_hl_timeout = 150, close_fold_kinds_for_ft = { @@ -30,7 +25,15 @@ ufo.setup({ jumpBot = "]", }, }, - provider_selector = function(_, ft, _) return not ignored_filetypes[ft] end, +}) +-- <== } + +-- { == Events ==> ============================================================ + +nx.au({ + "FileType", + pattern = { "markdown", "NeogitStatus" }, + callback = function() require("ufo").detach() end, }) -- <== }