return { "nvim-treesitter/nvim-treesitter", lazy = false, build = ":TSUpdate", opts = { install_dir = vim.fn.stdpath("data") .. "/site", }, config = function() -- Install specified languages for Treesitter require("nvim-treesitter").install({ "rust", "javascript", "python", "fish", "ssh_config" }):wait(300000) -- Enable Treesitter highlighting for specified file types vim.api.nvim_create_autocmd("FileType", { pattern = { "javascript", "rust", "python", "lua" }, callback = function() vim.treesitter.start() -- Start Treesitter highlighting end, }) -- Set up Treesitter-based folding vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()" vim.wo.foldmethod = "expr" -- Enable Treesitter-based indentation vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end, }