1
0
Fork 0

neovim: Add bindings for treesitter function boundaries

This commit is contained in:
Jeremy Kaplan 2024-11-04 07:09:58 -08:00
commit c8914e7c7a

View file

@ -82,11 +82,8 @@ return {
enable = true, enable = true,
select = { select = {
enable = true, enable = true,
lookahead = true, lookahead = true,
include_surrounding_whitespace = false, include_surrounding_whitespace = false,
-- https://github.com/nvim-treesitter/nvim-treesitter-textobjects#overriding-or-extending-textobjects -- https://github.com/nvim-treesitter/nvim-treesitter-textobjects#overriding-or-extending-textobjects
keymaps = { keymaps = {
["af"] = "@function.outer", ["af"] = "@function.outer",
@ -95,6 +92,26 @@ return {
["ic"] = "@comment.outer", ["ic"] = "@comment.outer",
}, },
}, },
move = {
enable = true,
set_jumps = true,
goto_next_start = {
["]m"] = "@function.outer",
["]{"] = "@block.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]}"] = "@block.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[{"] = "@block.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[}"] = "@block.outer",
},
},
}, },
ensure_installed = { ensure_installed = {