neovim: Add bindings for treesitter function boundaries
This commit is contained in:
parent
e90c528828
commit
c8914e7c7a
1 changed files with 20 additions and 3 deletions
|
|
@ -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 = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue