return { { "nvim-treesitter/nvim-treesitter", -- Pin to archived `master` branch: this config uses the legacy -- `nvim-treesitter.configs` API, which the `main` rewrite dropped. branch = "master", dependencies = { "JoosepAlviste/nvim-ts-context-commentstring", { "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" }, }, config = function(_, opts) require("nvim-treesitter.configs").setup(opts) end, opts = { ensure_installed = { "vim", "lua", "vimdoc", "html", "css", "c_sharp", "rust", "regex", "javascript", "typescript", "tsx", "solidity", "toml", "bash", "markdown", "markdown_inline", "json", "elixir", "erlang", "eex", "heex", "kdl", "yuck", "sql", "typst", }, incremental_selection = { enable = true, keymaps = { init_selection = "", node_incremental = "", scope_incremental = "", node_decremental = "", }, }, highlight = { enable = true }, textobjects = { lsp_interop = { enable = true, }, select = { enable = true, lookahead = true, keymaps = { ["af"] = "@function.outer", ["if"] = "@function.inner", ["ac"] = "@function.outer", ["ic"] = "@function.inner", ["ae"] = "@block.outer", ["ie"] = "@block.inner", ["as"] = "@statement.outer", ["is"] = "@statement.inner", ["am"] = "@call.outer", ["im"] = "@call.inner", }, }, move = { enable = true, set_jumps = true, goto_next_start = { ["]m"] = "@function.outer", }, goto_next_end = { ["]M"] = "@function.outer", }, goto_previous_start = { ["[m"] = "@function.outer", }, goto_previous_end = { ["[M"] = "@function.outer", }, }, }, }, }, { "davidmh/mdx.nvim", lazy = false, dependencies = { "nvim-treesitter/nvim-treesitter" }, }, }