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,
priority = 1000,
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"astro", "bash", "c", "css", "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",
"astro",
"bash",
"c",
"css",
"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,
auto_install = true,
@@ -30,6 +59,18 @@ return {
node_decremental = "<bs>",
},
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
})
end,
},
@@ -41,21 +82,4 @@ return {
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",
},
},
},
},
}