mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(options): use native folding
see https://github.com/neovim/neovim/pull/20750
This commit is contained in:
parent
2df9c9ea9d
commit
3888f2e044
1 changed files with 3 additions and 1 deletions
|
|
@ -72,16 +72,18 @@ end
|
|||
|
||||
-- Folding
|
||||
vim.opt.foldlevel = 99
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
||||
|
||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
||||
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
||||
end
|
||||
|
||||
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
||||
vim.opt.foldtext = ""
|
||||
vim.opt.fillchars = "fold: "
|
||||
else
|
||||
vim.opt.foldmethod = "indent"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue