Skip to content

Commit

Permalink
fix(telescope): remove telescope folding hack since PR with fix has b…
Browse files Browse the repository at this point in the history
…een merged upstream
  • Loading branch information
folke committed Oct 9, 2023
1 parent 44984dc commit 02bc414
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lua/lazyvim/config/autocmds.lua
Expand Up @@ -92,16 +92,3 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
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,
})

0 comments on commit 02bc414

Please sign in to comment.