@@ -401,6 +401,8 @@ impl MappableCommand {
401401 goto_prev_class, "Goto previous class",
402402 goto_next_parameter, "Goto next parameter",
403403 goto_prev_parameter, "Goto previous parameter",
404+ goto_next_comment, "Goto next comment",
405+ goto_prev_comment, "Goto previous comment",
404406 dap_launch, "Launch debug target",
405407 dap_toggle_breakpoint, "Toggle breakpoint",
406408 dap_continue, "Continue program execution",
@@ -5381,6 +5383,14 @@ fn goto_prev_parameter(cx: &mut Context) {
53815383 goto_ts_object_impl(cx, "parameter", Direction::Backward)
53825384}
53835385
5386+fn goto_next_comment(cx: &mut Context) {
5387+ goto_ts_object_impl(cx, "comment", Direction::Forward)
5388+}
5389+
5390+fn goto_prev_comment(cx: &mut Context) {
5391+ goto_ts_object_impl(cx, "comment", Direction::Backward)
5392+}
5393+
53845394fn select_textobject_around(cx: &mut Context) {
53855395 select_textobject(cx, textobject::TextObject::Around);
53865396}
@@ -5423,6 +5433,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
54235433 'c' => textobject_treesitter("class", range),
54245434 'f' => textobject_treesitter("function", range),
54255435 'p' => textobject_treesitter("parameter", range),
5436+ 'o' => textobject_treesitter("comment", range),
54265437 'm' => {
54275438 let ch = text.char(range.cursor(text));
54285439 if !ch.is_ascii_alphanumeric() {
@@ -5456,6 +5467,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
54565467 ("c", "Class (tree-sitter)"),
54575468 ("f", "Function (tree-sitter)"),
54585469 ("p", "Parameter (tree-sitter)"),
5470+ ("o", "Comment (tree-sitter)"),
54595471 ("m", "Matching delimiter under cursor"),
54605472 (" ", "... or any character acting as a pair"),
54615473 ];