FollieHiyuki-dotfiles/home/.config/nvim/lua/modules/textobjects.lua
2021-10-17 21:48:10 +07:00

34 lines
993 B
Lua

return require('nvim-treesitter.configs').setup {
textobjects = {
select = {
enable = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner"
}
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]["] = "@function.outer",
["]m"] = "@class.outer"
},
goto_next_end = {
["]]"] = "@function.outer",
["]M"] = "@class.outer"
},
goto_previous_start = {
["[["] = "@function.outer",
["[m"] = "@class.outer"
},
goto_previous_end = {
["[]"] = "@function.outer",
["[M"] = "@class.outer"
}
}
}
}