diff --git a/init.lua b/init.lua index 090bb89a..72af0a7c 100644 --- a/init.lua +++ b/init.lua @@ -918,6 +918,37 @@ require('lazy').setup({ -- and should return true or false include_surrounding_whitespace = false, }, + -- allows swapping objects back and forth - IMO only really useful for parameters + swap = { + enable = true, + swap_next = { + ['a'] = '@parameter.inner', + }, + swap_previous = { + ['A'] = '@parameter.inner', + }, + }, + -- allows "textobject-y" jumps + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + 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', + }, + }, }, }, config = function(_, opts)