Fix treesitter initialization
This commit is contained in:
parent
456fc0da59
commit
2fcf44dc3e
1 changed files with 59 additions and 57 deletions
|
|
@ -13,66 +13,68 @@ return {
|
|||
},
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"bash",
|
||||
"lua",
|
||||
"c",
|
||||
"cpp",
|
||||
"c_sharp",
|
||||
"rust",
|
||||
"cmake",
|
||||
"make",
|
||||
"yaml",
|
||||
"ninja",
|
||||
"gitignore",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"hyprlang",
|
||||
"json",
|
||||
"html",
|
||||
"hlsl",
|
||||
"glsl",
|
||||
"gdshader",
|
||||
"gdscript",
|
||||
"dockerfile",
|
||||
"dart",
|
||||
"css",
|
||||
"regex"
|
||||
},
|
||||
sync_install = false,
|
||||
-- This can be updated to a list of languages instead of defaulting to true
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-cr>",
|
||||
node_incremental = "<C-cr>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<C-bs>",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"bash",
|
||||
"lua",
|
||||
"c",
|
||||
"cpp",
|
||||
"c_sharp",
|
||||
"rust",
|
||||
"cmake",
|
||||
"make",
|
||||
"yaml",
|
||||
"ninja",
|
||||
"gitignore",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"hyprlang",
|
||||
"json",
|
||||
"html",
|
||||
"hlsl",
|
||||
"glsl",
|
||||
"gdshader",
|
||||
"gdscript",
|
||||
"dockerfile",
|
||||
"dart",
|
||||
"css",
|
||||
"regex"
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
sync_install = false,
|
||||
-- This can be updated to a list of languages instead of defaulting to true
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["ic"] = { query = "@class.inner" },
|
||||
["ac"] = { query = "@class.outer" },
|
||||
["ii"] = { query = "@conditional.inner" },
|
||||
["ai"] = { query = "@conditional.outer" },
|
||||
["if"] = { query = "@function.inner" },
|
||||
["af"] = { query = "@function.outer" },
|
||||
["il"] = { query = "@loop.inner" },
|
||||
["al"] = { query = "@loop.outer" },
|
||||
init_selection = "<C-cr>",
|
||||
node_incremental = "<C-cr>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<C-bs>",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["ic"] = { query = "@class.inner" },
|
||||
["ac"] = { query = "@class.outer" },
|
||||
["ii"] = { query = "@conditional.inner" },
|
||||
["ai"] = { query = "@conditional.outer" },
|
||||
["if"] = { query = "@function.inner" },
|
||||
["af"] = { query = "@function.outer" },
|
||||
["il"] = { query = "@loop.inner" },
|
||||
["al"] = { query = "@loop.outer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue