mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): add ufo plugin for better folds
This commit is contained in:
20
nvim/after/plugin/ufo.lua
Normal file
20
nvim/after/plugin/ufo.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- https://github.com/kevinhwang91/nvim-ufo
|
||||
local status_ok, ufo = pcall(require, "ufo")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local keymap = vim.keymap.set
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Options
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
ufo.setup()
|
||||
|
||||
-- Keymaps
|
||||
keymap("n", "zR", require("ufo").openAllFolds, opts)
|
||||
keymap("n", "zM", require("ufo").closeAllFolds, opts)
|
||||
Reference in New Issue
Block a user