From 8ad5327c893b1585dd726190f5fb0279c9e78db4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 26 Feb 2022 19:45:09 +0100 Subject: [PATCH] home: vim: add 'tree-sitter' moves --- home/vim/plugin/settings/tree-sitter.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/home/vim/plugin/settings/tree-sitter.vim b/home/vim/plugin/settings/tree-sitter.vim index 10c22b1..059fac7 100644 --- a/home/vim/plugin/settings/tree-sitter.vim +++ b/home/vim/plugin/settings/tree-sitter.vim @@ -26,6 +26,27 @@ ts_config.setup({ ["ak"] = "@comment.outer", }, }, + move = { + enable = true, + -- Add to jump list + set_jumps = true, + goto_next_start = { + ["]m"] = "@function.outer", + ["]]"] = "@class.outer", + }, + goto_next_end = { + ["]M"] = "@function.outer", + ["]["] = "@class.outer", + }, + goto_previous_start = { + ["[m"] = "@function.outer", + ["[["] = "@class.outer", + }, + goto_previous_end = { + ["[M"] = "@function.outer", + ["[]"] = "@class.outer", + }, + }, }, }) EOF