summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-08-02 19:35:52 +0200
committerStephan Seitz <stephan.seitz@fau.de>2020-08-17 17:44:40 +0200
commite629efafd8f529ff9b1297b947b4438bf4d2265c (patch)
tree83d60021573cbba25b0a829b8417297e13dbda0e /README.md
parent1642e37499e0d58952cb6b5e3bedc9126cc43e4a (diff)
Textobjects: provide mappings for all swap/goto functions
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index 915fcf71..21d6df24 100644
--- a/README.md
+++ b/README.md
@@ -147,7 +147,31 @@ require'nvim-treesitter.configs'.setup {
["ad"] = "@comment.outer",
["am"] = "@call.outer",
["im"] = "@call.inner"
- }
+ },
+ -- swap parameters (keymap -> textobject query)
+ swap_next = {
+ ["<a-p>"] = "@parameter.inner",
+ },
+ swap_previous = {
+ ["<a-P>"] = "@parameter.inner",
+ },
+ -- set mappings to go to start/end of adjacent textobjects (keymap -> textobject query)
+ goto_previous_start = {
+ ["[m"] = "@function.outer",
+ ["[["] = "@class.outer",
+ },
+ goto_previous_end = {
+ ["[M"] = "@function.outer",
+ ["[]"] = "@class.outer",
+ },
+ goto_next_start = {
+ ["]m"] = "@function.outer",
+ ["]]"] = "@class.outer",
+ },
+ goto_next_end = {
+ ["]M"] = "@function.outer",
+ ["]["] = "@class.outer",
+ },
},
ensure_installed = "all" -- one of "all", "language", or a list of languages
}