add more treesitter-textobjects configs

pull/887/head
Dmitry O 1 month ago
parent 73c7b978ce
commit e17bf38bee
No known key found for this signature in database
GPG Key ID: 0211C19E5FA3A361

@ -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 = {
['<leader>a'] = '@parameter.inner',
},
swap_previous = {
['<leader>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)

Loading…
Cancel
Save