require("nvim-treesitter").install({ "bash", "c", "cmake", "comment", "cpp", "gitignore", "go", "html", "java", "javascript", "json", "jsx", "ledger", "lua", "luadoc", "luap", "markdown", "markdown_inline", "python", "query", "regex", "rust", "scala", "tsx", "typescript", "vim", "vimdoc", "yaml", "zsh", }) local augroup = vim.api.nvim_create_augroup("treesitter-init", {}) vim.api.nvim_create_autocmd("FileType", { pattern = { "cpp", "cmake", "go", "java", "javascript", "javascriptreact", "ledger", "lua", "markdown", "python", "rust", "typescript", "typescriptreact", "scala", }, callback = function() vim.treesitter.start() vim.opt.foldmethod = "expr" vim.opt.foldlevel = 99 vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" end, group = augroup, })