fix(telescope): remove telescope folding hack since PR with fix has been merged upstream

This commit is contained in:
Folke Lemaitre 2023-10-09 23:32:34 +02:00
parent 44984dcbe2
commit 02bc41412a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -92,16 +92,3 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p") vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end, end,
}) })
-- HACK: re-caclulate folds when entering a buffer through Telescope
-- @see https://github.com/nvim-telescope/telescope.nvim/issues/699
vim.api.nvim_create_autocmd("BufEnter", {
group = augroup("fix_folds"),
callback = function()
if vim.opt.foldmethod:get() == "expr" then
vim.schedule(function()
vim.opt.foldmethod = "expr"
end)
end
end,
})