From 42df991fc28f0099e1965f2fedbfa96f8d00a73b Mon Sep 17 00:00:00 2001 From: wenjin <30885216+wenjinnn@users.noreply.github.com> Date: Fri, 31 May 2024 19:55:16 +0800 Subject: [PATCH] fix(split): no fold find if foldexpr setup (#166) foldlevel computing can manually trigger with `zx`, so we just need recompute foldlevel after setup filetype to json | html | text --- lua/hurl/split.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/hurl/split.lua b/lua/hurl/split.lua index 48b9664..6a4ff19 100644 --- a/lua/hurl/split.lua +++ b/lua/hurl/split.lua @@ -57,6 +57,8 @@ M.show = function(data, type) -- After 200ms, the highlight will be applied vim.defer_fn(function() vim.bo[split.bufnr].filetype = type + -- recomputing foldlevel, this is needed if we setup foldexpr + vim.api.nvim_feedkeys('zx', 'n', true) end, 200) local function quit()