Skip to content

Commit

Permalink
fix: Update treesitter text object default config
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Sep 1, 2023
1 parent 1f1c1dd commit 5ce04d3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 56 deletions.
52 changes: 24 additions & 28 deletions docs/Configuration/plugin_defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,59 +542,55 @@ opts = {
enable = true,
lookahead = true,
keymaps = {
["ak"] = "@block.outer",
["ik"] = "@block.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
["a?"] = "@conditional.outer",
["i?"] = "@conditional.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["al"] = "@loop.outer",
["il"] = "@loop.inner",
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["ak"] = { query = "@block.outer", desc = "around block" },
["ik"] = { query = "@block.inner", desc = "inside block" },
["ac"] = { query = "@class.outer", desc = "around class" },
["ic"] = { query = "@class.inner", desc = "inside class" },
["a?"] = { query = "@conditional.outer", desc = "around conditional" },
["i?"] = { query = "@conditional.inner", desc = "inside conditional" },
["af"] = { query = "@function.outer", desc = "around function " },
["if"] = { query = "@function.inner", desc = "inside function " },
["al"] = { query = "@loop.outer", desc = "around loop" },
["il"] = { query = "@loop.inner", desc = "inside loop" },
["aa"] = { query = "@parameter.outer", desc = "around argument" },
["ia"] = { query = "@parameter.inner", desc = "inside argument" },
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
["]k"] = { query = "@block.outer", desc = "Next block start" },
["]c"] = { query = "@class.outer", desc = "Next class start" },
["]f"] = { query = "@function.outer", desc = "Next function start" },
["]a"] = { query = "@parameter.outer", desc = "Next parameter start" },
["]a"] = { query = "@parameter.inner", desc = "Next argument start" },
},
goto_next_end = {
["]k"] = { query = "@block.outer", desc = "Next block end" },
["]c"] = { query = "@class.outer", desc = "Next class end" },
["]f"] = { query = "@function.outer", desc = "Next function end" },
["]a"] = { query = "@parameter.outer", desc = "Next parameter end" },
["]K"] = { query = "@block.outer", desc = "Next block end" },
["]F"] = { query = "@function.outer", desc = "Next function end" },
["]A"] = { query = "@parameter.inner", desc = "Next argument end" },
},
goto_previous_start = {
["[k"] = { query = "@block.outer", desc = "Previous block start" },
["[c"] = { query = "@class.outer", desc = "Previous class start" },
["[f"] = { query = "@function.outer", desc = "Previous function start" },
["[a"] = { query = "@parameter.outer", desc = "Previous parameter start" },
["[a"] = { query = "@parameter.inner", desc = "Previous argument start" },
},
goto_previous_end = {
["[K"] = { query = "@block.outer", desc = "Previous block end" },
["[C"] = { query = "@class.outer", desc = "Previous class end" },
["[F"] = { query = "@function.outer", desc = "Previous function end" },
["[A"] = { query = "@parameter.outer", desc = "Previous parameter end" },
["[A"] = { query = "@parameter.inner", desc = "Previous argument end" },
},
},
swap = {
enable = true,
swap_next = {
[">k"] = { query = "@block.outer", desc = "Swap next block" },
[">f"] = { query = "@function.outer", desc = "Swap next function" },
[">a"] = { query = "@parameter.inner", desc = "Swap next parameter" },
[">K"] = { query = "@block.outer", desc = "Swap next block" },
[">F"] = { query = "@function.outer", desc = "Swap next function" },
[">A"] = { query = "@parameter.inner", desc = "Swap next argument" },
},
swap_previous = {
["<k"] = { query = "@block.outer", desc = "Swap previous block" },
["<f"] = { query = "@function.outer", desc = "Swap previous function" },
["<a"] = { query = "@parameter.inner", desc = "Swap previous parameter" },
["<K"] = { query = "@block.outer", desc = "Swap previous block" },
["<F"] = { query = "@function.outer", desc = "Swap previous function" },
["<A"] = { query = "@parameter.inner", desc = "Swap previous argument" },
},
},
},
Expand Down
52 changes: 24 additions & 28 deletions versioned_docs/version-3.36.0/Configuration/plugin_defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,59 +542,55 @@ opts = {
enable = true,
lookahead = true,
keymaps = {
["ak"] = "@block.outer",
["ik"] = "@block.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
["a?"] = "@conditional.outer",
["i?"] = "@conditional.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["al"] = "@loop.outer",
["il"] = "@loop.inner",
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["ak"] = { query = "@block.outer", desc = "around block" },
["ik"] = { query = "@block.inner", desc = "inside block" },
["ac"] = { query = "@class.outer", desc = "around class" },
["ic"] = { query = "@class.inner", desc = "inside class" },
["a?"] = { query = "@conditional.outer", desc = "around conditional" },
["i?"] = { query = "@conditional.inner", desc = "inside conditional" },
["af"] = { query = "@function.outer", desc = "around function " },
["if"] = { query = "@function.inner", desc = "inside function " },
["al"] = { query = "@loop.outer", desc = "around loop" },
["il"] = { query = "@loop.inner", desc = "inside loop" },
["aa"] = { query = "@parameter.outer", desc = "around argument" },
["ia"] = { query = "@parameter.inner", desc = "inside argument" },
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
["]k"] = { query = "@block.outer", desc = "Next block start" },
["]c"] = { query = "@class.outer", desc = "Next class start" },
["]f"] = { query = "@function.outer", desc = "Next function start" },
["]a"] = { query = "@parameter.outer", desc = "Next parameter start" },
["]a"] = { query = "@parameter.inner", desc = "Next argument start" },
},
goto_next_end = {
["]k"] = { query = "@block.outer", desc = "Next block end" },
["]c"] = { query = "@class.outer", desc = "Next class end" },
["]f"] = { query = "@function.outer", desc = "Next function end" },
["]a"] = { query = "@parameter.outer", desc = "Next parameter end" },
["]K"] = { query = "@block.outer", desc = "Next block end" },
["]F"] = { query = "@function.outer", desc = "Next function end" },
["]A"] = { query = "@parameter.inner", desc = "Next argument end" },
},
goto_previous_start = {
["[k"] = { query = "@block.outer", desc = "Previous block start" },
["[c"] = { query = "@class.outer", desc = "Previous class start" },
["[f"] = { query = "@function.outer", desc = "Previous function start" },
["[a"] = { query = "@parameter.outer", desc = "Previous parameter start" },
["[a"] = { query = "@parameter.inner", desc = "Previous argument start" },
},
goto_previous_end = {
["[K"] = { query = "@block.outer", desc = "Previous block end" },
["[C"] = { query = "@class.outer", desc = "Previous class end" },
["[F"] = { query = "@function.outer", desc = "Previous function end" },
["[A"] = { query = "@parameter.outer", desc = "Previous parameter end" },
["[A"] = { query = "@parameter.inner", desc = "Previous argument end" },
},
},
swap = {
enable = true,
swap_next = {
[">k"] = { query = "@block.outer", desc = "Swap next block" },
[">f"] = { query = "@function.outer", desc = "Swap next function" },
[">a"] = { query = "@parameter.inner", desc = "Swap next parameter" },
[">K"] = { query = "@block.outer", desc = "Swap next block" },
[">F"] = { query = "@function.outer", desc = "Swap next function" },
[">A"] = { query = "@parameter.inner", desc = "Swap next argument" },
},
swap_previous = {
["<k"] = { query = "@block.outer", desc = "Swap previous block" },
["<f"] = { query = "@function.outer", desc = "Swap previous function" },
["<a"] = { query = "@parameter.inner", desc = "Swap previous parameter" },
["<K"] = { query = "@block.outer", desc = "Swap previous block" },
["<F"] = { query = "@function.outer", desc = "Swap previous function" },
["<A"] = { query = "@parameter.inner", desc = "Swap previous argument" },
},
},
},
Expand Down

1 comment on commit 5ce04d3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.