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,7 +15,11 @@ function M.foldexpr()
|
||||||
if vim.bo[buf].filetype == "" then
|
if vim.bo[buf].filetype == "" then
|
||||||
return "0"
|
return "0"
|
||||||
end
|
end
|
||||||
vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf)
|
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
|
end
|
||||||
return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0"
|
return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue