2023-01-01 14:16:21 +00:00
|
|
|
local ok, treesitter = pcall(require, "nvim-treesitter.configs")
|
|
|
|
if not ok then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
treesitter.setup {
|
|
|
|
highlight = {
|
|
|
|
enable = true,
|
2023-05-08 13:21:15 +00:00
|
|
|
additional_vim_regex_highlighting = false,
|
2023-01-01 14:16:21 +00:00
|
|
|
},
|
2023-05-24 09:44:09 +00:00
|
|
|
indent = {
|
|
|
|
enable = false,
|
|
|
|
},
|
2023-01-01 14:16:21 +00:00
|
|
|
textobjects = {
|
|
|
|
select = {
|
|
|
|
enable = true,
|
|
|
|
keymaps = {
|
|
|
|
["af"] = "@function.outer",
|
|
|
|
["if"] = "@function.inner",
|
|
|
|
["ia"] = "@parameter.inner",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
swap = {
|
|
|
|
enable = true,
|
|
|
|
swap_next = {
|
|
|
|
["<leader>@"] = "@parameter.inner",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
move = {
|
|
|
|
enable = true,
|
|
|
|
goto_next_start = {
|
|
|
|
["]]"] = "@function.outer",
|
|
|
|
},
|
|
|
|
goto_next_end = {
|
|
|
|
["]["] = "@function.outer",
|
|
|
|
},
|
|
|
|
goto_previous_start = {
|
|
|
|
["[["] = "@function.outer",
|
|
|
|
},
|
|
|
|
goto_previous_end = {
|
|
|
|
["[]"] = "@function.outer",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
playground = {
|
|
|
|
enable = true,
|
|
|
|
keybindings = {
|
|
|
|
update = "R",
|
|
|
|
toggle_query_editor = "o",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|