dotfiles/home/.config/nvim/lua/plugins/ufo.lua
Marko Korhonen 0ced314c90
Refactor neovim config file structure
All plugins are now in their own files with their lazy specifications
and configurations. Also moved lazy initialization to init.lua because
it is very compact now
2023-11-18 02:27:14 +02:00

29 lines
670 B
Lua

-- Better folds
-- Disabled for now because it causes weird artifacts
return {
enabled = false,
"kevinhwang91/nvim-ufo",
dependencies = { "kevinhwang91/promise-async" },
opts = {
close_fold_kinds = {
"imports",
},
},
config = function(spec)
local ufo = require("ufo")
ufo.setup(spec.opts)
-- Using ufo, need to remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
local keymap = vim.keymap
keymap.set("n", "zR", ufo.openAllFolds)
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,
}