56 lines
1.2 KiB
Lua
56 lines
1.2 KiB
Lua
require'nvim-treesitter.configs'.setup {
|
|
ensure_installed = { "bash", "c", "cpp", "fennel", "java", "lua", "python", "rust", "toml" },
|
|
highlight = {
|
|
enable = true,
|
|
},
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
keymaps = {
|
|
["af"] = "@function.outer",
|
|
["if"] = "@function.inner",
|
|
["ac"] = "@class.outer",
|
|
["ic"] = "@class.inner",
|
|
},
|
|
},
|
|
swap = {
|
|
enable = true,
|
|
swap_next = {
|
|
["gs"] = "@parameter.inner",
|
|
},
|
|
swap_previous = {
|
|
["gS"] = "@parameter.inner",
|
|
},
|
|
},
|
|
move = {
|
|
enable = true,
|
|
goto_next_start = {
|
|
["]f"] = "@function.outer",
|
|
["]]"] = "@class.outer",
|
|
},
|
|
goto_next_end = {
|
|
["]F"] = "@function.outer",
|
|
["]["] = "@class.outer",
|
|
},
|
|
goto_previous_start = {
|
|
["[f"] = "@function.outer",
|
|
["[["] = "@class.outer",
|
|
},
|
|
goto_previous_end = {
|
|
["[F"] = "@function.outer",
|
|
["[]"] = "@class.outer",
|
|
},
|
|
},
|
|
},
|
|
refactor = {
|
|
highlight_definitions = { enable = true },
|
|
highlight_current_scope = { enable = false },
|
|
smart_rename = {
|
|
enable = true,
|
|
keymaps = {
|
|
smart_rename = "grr",
|
|
},
|
|
},
|
|
},
|
|
}
|