dotfiles/lua/autocmds.lua
Joshua Finch 487f874984 Massive rewrite and modularization of the existing neovim config to
break it up into multiple files and to use a maintained package manager
(lazy.nvim)
2024-02-29 21:22:09 -06:00

7 lines
348 B
Lua

-- Fix for treesitter folds, as folds are not recalculated upon buffer changes (especially when pasting text)
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufNew', 'BufWinEnter' }, {
pattern = '*',
group = vim.api.nvim_create_augroup('telescope_fold_workaround', { clear = true }),
command = 'set foldexpr=nvim_treesitter#foldexpr()',
})