diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua index 886c47d9f9..cb8dc793ee 100644 --- a/lua/telescope/actions/set.lua +++ b/lua/telescope/actions/set.lua @@ -201,6 +201,13 @@ action_set.edit = function(prompt_bufnr, command) end end + -- HACK: fixes folding: https://github.com/nvim-telescope/telescope.nvim/issues/699 + if vim.wo.foldmethod == "expr" then + vim.schedule(function() + vim.opt.foldmethod = "expr" + end) + end + local pos = vim.api.nvim_win_get_cursor(0) if col == nil then if row == pos[1] then