diff --git a/lua/plugins/syntax.lua b/lua/plugins/syntax.lua index 9840f9f..4f1d59e 100644 --- a/lua/plugins/syntax.lua +++ b/lua/plugins/syntax.lua @@ -34,4 +34,20 @@ return { end end, }, + + { + "nvim-treesitter/nvim-treesitter-textobjects", + opts = { + move = { + enable = true, + set_jumps = true, + keys = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + }, + }, + }, + }, }