dotfiles/private_dot_config/nvim/lua/plugins/nvim-treesitter/workaround.lua
2023-07-27 22:39:59 +02:00

17 lines
555 B
Lua

--[[
Loads workaround found on
https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation
--]]
-- vim.opt.foldmethod = 'expr'
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
---WORKAROUND to enable folding
--[[ vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
callback = function()
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
end
})
--]]
---ENDWORKAROUND