mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
perf(ui): never show folds on dashboards
This commit is contained in:
parent
33557ae68b
commit
0352f944c3
1 changed files with 5 additions and 1 deletions
|
@ -15,8 +15,12 @@ function M.foldexpr()
|
|||
if vim.bo[buf].filetype == "" then
|
||||
return "0"
|
||||
end
|
||||
if vim.bo[buf].filetype:find("dashboard") then
|
||||
vim.b[buf].ts_folds = false
|
||||
else
|
||||
vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf)
|
||||
end
|
||||
end
|
||||
return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue