This repository has been archived on 2022-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.config/nvim/lua/modules/textobjects.lua

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"
}
}
}
}