2024-03-12 01:28:22 -04:00
|
|
|
vim.o.foldcolumn = "1" -- '0' is not bad
|
|
|
|
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
|
|
|
vim.o.foldlevelstart = 99
|
|
|
|
vim.o.foldenable = true
|
2024-11-17 22:19:14 -05:00
|
|
|
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
2024-03-12 01:28:22 -04:00
|
|
|
|
|
|
|
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
|
|
|
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
|
|
|
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
|
|
|
|
|
|
|
-- Option 2: nvim lsp as LSP client
|
|
|
|
-- Tell the server the capability of foldingRange,
|
|
|
|
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
|
|
|
|
-- in setuplsp.lua
|
|
|
|
require("ufo").setup()
|
|
|
|
--
|
|
|
|
|