Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index d545480b..d927d3f4 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -475,6 +475,8 @@ impl MappableCommand {
goto_prev_comment, "Goto previous comment",
goto_next_test, "Goto next test",
goto_prev_test, "Goto previous test",
+ goto_next_entry, "Goto next pairing",
+ goto_prev_entry, "Goto previous pairing",
goto_next_paragraph, "Goto next paragraph",
goto_prev_paragraph, "Goto previous paragraph",
dap_launch, "Launch debug target",
@@ -5167,6 +5169,14 @@ fn goto_prev_test(cx: &mut Context) {
goto_ts_object_impl(cx, "test", Direction::Backward)
}
+fn goto_next_entry(cx: &mut Context) {
+ goto_ts_object_impl(cx, "entry", Direction::Forward)
+}
+
+fn goto_prev_entry(cx: &mut Context) {
+ goto_ts_object_impl(cx, "entry", Direction::Backward)
+}
+
fn select_textobject_around(cx: &mut Context) {
select_textobject(cx, textobject::TextObject::Around);
}
@@ -5231,6 +5241,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
'a' => textobject_treesitter("parameter", range),
'c' => textobject_treesitter("comment", range),
'T' => textobject_treesitter("test", range),
+ 'e' => textobject_treesitter("entry", range),
'p' => textobject::textobject_paragraph(text, range, objtype, count),
'm' => textobject::textobject_pair_surround_closest(
text, range, objtype, count,
@@ -5263,6 +5274,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
("a", "Argument/parameter (tree-sitter)"),
("c", "Comment (tree-sitter)"),
("T", "Test (tree-sitter)"),
+ ("e", "Data structure entry (tree-sitter)"),
("m", "Closest surrounding pair"),
(" ", "... or any character acting as a pair"),
];