This commit is contained in:
2025-12-22 14:03:10 -06:00
parent b17afad345
commit 9f9f6e5c5a

View File

@@ -5,14 +5,43 @@ return {
lazy = false, lazy = false,
priority = 1000, priority = 1000,
build = ":TSUpdate", build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function() config = function()
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
ensure_installed = { ensure_installed = {
"astro", "bash", "c", "css", "diff", "go", "gomod", "gowork", "gosum", "astro",
"graphql", "html", "javascript", "jsdoc", "json", "jsonc", "json5", "bash",
"lua", "luadoc", "luap", "markdown", "markdown_inline", "python", "c",
"query", "regex", "toml", "tsx", "typescript", "vim", "vimdoc", "css",
"yaml", "ruby", "diff",
"go",
"gomod",
"gowork",
"gosum",
"graphql",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"json5",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"yaml",
"ruby",
}, },
sync_install = false, sync_install = false,
auto_install = true, auto_install = true,
@@ -30,6 +59,18 @@ return {
node_decremental = "<bs>", node_decremental = "<bs>",
}, },
}, },
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
}) })
end, end,
}, },
@@ -41,21 +82,4 @@ return {
multiwindow = true, multiwindow = true,
}, },
}, },
{
"nvim-treesitter/nvim-treesitter-textobjects",
event = "BufReadPre",
dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
},
} }