disable treesitter ts in diffmode

neovim_0.9
ray-x 2 months ago
parent 6a02536445
commit 65df819a66

@ -154,6 +154,12 @@ function M.setup_fold()
-- user should setup fillchars themself
-- vim.opt.fillchars = { foldclose = "", foldopen = "", vert = "│", fold = " ", diff = "░", msgsep = "‾", foldsep = "│" }
local current_window = api.nvim_get_current_win()
local in_diff_mode = api.nvim_win_get_option(current_window, 'diff')
if in_diff_mode then
-- In diff mode, use diff folding.
return
end
local current_window = api.nvim_get_current_win()
if not parsers.has_parser() then
api.nvim_win_set_option(current_window, 'foldmethod', 'indent')

Loading…
Cancel
Save