mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-28 14:45:07 +02:00
fix(options): only enable treesitter foldexpr
on nightly. Fixes #1581
This commit is contained in:
parent
3849e0150b
commit
d989ecc943
1 changed files with 5 additions and 1 deletions
|
@ -65,9 +65,13 @@ 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()]]
|
||||
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.vim.treesitter.foldexpr()"
|
||||
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util.ui'.statuscolumn()]]
|
||||
else
|
||||
vim.opt.foldmethod = "indent"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue