Skip to content

Commit 28d4da4

Browse files
chore(build): auto-generate docs
1 parent af4be7b commit 28d4da4

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

docs/configuration/general.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds
124124
opt.foldlevel = 99
125125
opt.foldmethod = "expr"
126126
opt.foldtext = ""
127-
opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
127+
opt.formatexpr = "v:lua.LazyVim.format.formatexpr()"
128128
opt.formatoptions = "jcroqlnt" -- tcqj
129129
opt.grepformat = "%f:%l:%c:%m"
130130
opt.grepprg = "rg --vimgrep"

docs/plugins/treesitter.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,18 @@ opts = {
131131

132132
-- treesitter highlighting
133133
vim.api.nvim_create_autocmd("FileType", {
134+
group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }),
134135
callback = function(ev)
135136
if LazyVim.treesitter.have(ev.match) then
136137
pcall(vim.treesitter.start)
138+
139+
-- check if ftplugins changed foldexpr/indentexpr
140+
for _, option in ipairs({ "foldexpr", "indentexpr" }) do
141+
local expr = "v:lua.LazyVim.treesitter." .. option .. "()"
142+
if vim.opt_global[option]:get() == expr then
143+
vim.opt_local[option] = expr
144+
end
145+
end
137146
end
138147
end,
139148
})

0 commit comments

Comments
 (0)