Add nvim config
This commit is contained in:
parent
b227b7cb19
commit
25a48b5694
48 changed files with 1550 additions and 2 deletions
28
home/.config/nvim/lua/plugins/ufo.lua
Normal file
28
home/.config/nvim/lua/plugins/ufo.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- 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,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue