updated
This commit is contained in:
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user