perf(options): better detection for foldtext,statuscolumn,folexpr support
This commit is contained in:
@ -62,18 +62,14 @@ end
|
||||
|
||||
-- Folding
|
||||
vim.opt.foldlevel = 99
|
||||
if vim.treesitter.foldexpr then
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
else
|
||||
vim.opt.foldmethod = "indent"
|
||||
end
|
||||
if vim.treesitter.foldtext then
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util.ui'.foldtext()"
|
||||
end
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util.ui'.foldtext()"
|
||||
|
||||
if vim.fn.has("nvim-0.9.0") == 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
|
||||
|
||||
-- Fix markdown indentation settings
|
||||
|
Reference in New Issue
Block a user