diff --git a/lua/znvim/plugins/editor.lua b/lua/znvim/plugins/editor.lua index ae8630a..449eb1a 100644 --- a/lua/znvim/plugins/editor.lua +++ b/lua/znvim/plugins/editor.lua @@ -242,7 +242,27 @@ return { "https://github.com/kevinhwang91/promise-async", }, event = "BufReadPost", - config = true, + keys = { + { + "zR", + function () + require('ufo').openAllFolds() + end, + desc = "Open all folds" + }, + { + "zM", + function () + require('ufo').closeAllFolds() + end, + desc = "Close all folds" + }, + }, + config = { + provider_selector = function(bufnr, filetype, buftype) + return {'treesitter', 'indent'} + end + }, }, { -- rainbow delimiters "https://gitlab.com/HiPhish/rainbow-delimiters.nvim",