diff --git a/lua/znvim/keymaps.lua b/lua/znvim/keymaps.lua index 24f52fc..3a4a66b 100644 --- a/lua/znvim/keymaps.lua +++ b/lua/znvim/keymaps.lua @@ -37,3 +37,7 @@ vim.keymap.set("n", "", "bprevious", { desc = "prev buffer" }) vim.keymap.set("n", "", "bnext", { desc = "next buffer" }) vim.keymap.set("n", "[b", "bprevious", { desc = "prev buffer" }) vim.keymap.set("n", "]b", "bnext", { desc = "next buffer" }) + +vim.keymap.set("n", "uf", function () + vim.opt.foldcolumn = vim.opt.foldcolumn:get() == "0" and "4" or "0" +end, { desc = "toggle fold column" }) diff --git a/lua/znvim/plugins/editor.lua b/lua/znvim/plugins/editor.lua index e83c3b3..b28a1f9 100644 --- a/lua/znvim/plugins/editor.lua +++ b/lua/znvim/plugins/editor.lua @@ -119,4 +119,14 @@ return { }, }, + + { -- better folding + "https://github.com/kevinhwang91/nvim-ufo", + dependencies = { + "https://github.com/kevinhwang91/promise-async", + }, + event = "BufReadPost", + config = true, + }, + }