fix(ts): preserve diff foldmethod in start_treesitter
This commit is contained in:
@@ -46,10 +46,12 @@ local function start_treesitter(buf)
|
||||
return
|
||||
end
|
||||
for _, win in ipairs(vim.fn.win_findbuf(buf)) do
|
||||
if not vim.wo[win].diff then
|
||||
vim.wo[win].foldmethod = "expr"
|
||||
vim.wo[win].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---@param lang string
|
||||
local function activate_open_buffers(lang)
|
||||
|
||||
Reference in New Issue
Block a user