mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-10-30 09:20:30 +00:00
29 lines
636 B
Lua
29 lines
636 B
Lua
-- Better folds
|
|
--- @type LazyPluginSpec
|
|
return {
|
|
"kevinhwang91/nvim-ufo",
|
|
dependencies = { "kevinhwang91/promise-async" },
|
|
--- @type UfoConfig
|
|
opts = {
|
|
close_fold_kinds_for_ft = {
|
|
default = { "imports" },
|
|
},
|
|
},
|
|
--- @param opts UfoConfig
|
|
config = function(_, opts)
|
|
local ufo = require("ufo")
|
|
ufo.setup(opts)
|
|
|
|
-- Using ufo, we need to remap `zR` and `zM`
|
|
vim.keymap.set("n", "zR", ufo.openAllFolds)
|
|
vim.keymap.set("n", "zM", ufo.closeAllFolds)
|
|
|
|
-- Fold settings
|
|
local o = vim.o
|
|
o.foldcolumn = "1"
|
|
o.foldlevel = 99
|
|
o.foldlevelstart = 99
|
|
o.foldenable = true
|
|
end,
|
|
}
|