return { { "nvim-treesitter/nvim-treesitter", build = function() pcall(require("nvim-treesitter.install").update({ with_sync = true })) end, dependencies = { "nvim-treesitter/nvim-treesitter-textobjects", }, config = function() require("nvim-treesitter.configs").setup({ ensure_installed = { "bash", "bibtex", "c", "cpp", "css", "fish", "http", "latex", "lua", "python", "rust", "vim" }, ignore_install = { }, auto_install = true, sync_install = false, highlight = { enable = true, disable = { "latex" }, additional_vim_regex_highlighting = false, }, indent = { enable = true, disable = { "python" } }, incremental_selection = { enable = true, keymaps = { init_selection = "gnn", node_incremental = "grn", scope_incremental = "grc", node_decremental = "grm", }, }, textobjects = { select = { enable = true, lookahead = true, -- automatically jump forward to textobj, similar to targets.vim keymaps = { -- you can use the capture groups defined in textobjects.scm ["aa"] = "@parameter.outer", ["ia"] = "@parameter.inner", ["af"] = "@function.outer", ["if"] = "@function.inner", ["ac"] = "@class.outer", ["ic"] = "@class.inner", }, }, move = { enable = true, set_jumps = true, -- whether to set jumps in the jumplist goto_next_start = { ["]m"] = "@function.outer", ["]]"] = "@class.outer", }, goto_next_end = { ["]M"] = "@function.outer", ["]["] = "@class.outer", }, goto_previous_start = { ["[m"] = "@function.outer", ["[["] = "@class.outer", }, goto_previous_end = { ["[M"] = "@function.outer", ["[]"] = "@class.outer", }, }, }, modules = { }, }) end, }, }