@@ -1032,7 +1032,24 @@ pub fn normal_mode(cx: &mut Context) {
10321032}
10331033
10341034pub fn goto_mode(cx: &mut Context) {
1035− cx.doc().mode = Mode::Goto;
1035+ cx.on_next_key(move |cx, event| {
1036+ if let KeyEvent {
1037+ code: KeyCode::Char(ch),
1038+ ..
1039+ } = event
1040+ {
1041+ // TODO: temporarily show GOTO in the mode list
1042+ match ch {
1043+ 'g' => move_file_start(cx),
1044+ 'e' => move_file_end(cx),
1045+ 'd' => goto_definition(cx),
1046+ 't' => goto_type_definition(cx),
1047+ 'r' => goto_reference(cx),
1048+ 'i' => goto_implementation(cx),
1049+ _ => (),
1050+ }
1051+ }
1052+ })
10361053}
10371054
10381055pub fn select_mode(cx: &mut Context) {
@@ -1043,7 +1060,7 @@ pub fn exit_select_mode(cx: &mut Context) {
10431060 cx.doc().mode = Mode::Normal;
10441061}
10451062
1046−fn goto(cx: &mut Context, locations: Vec<lsp::Location>) {
1063+fn _goto(cx: &mut Context, locations: Vec<lsp::Location>) {
10471064 use helix_view::editor::Action;
10481065 cx.doc().mode = Mode::Normal;
10491066
@@ -1093,7 +1110,7 @@ pub fn goto_definition(cx: &mut Context) {
10931110 // TODO: handle fails
10941111 let res =
10951112 smol::block_on(language_server.goto_definition(doc.identifier(), pos)).unwrap_or_default();
1096− goto(cx, res);
1113+ _goto(cx, res);
10971114}
10981115
10991116pub fn goto_type_definition(cx: &mut Context) {
@@ -1109,7 +1126,7 @@ pub fn goto_type_definition(cx: &mut Context) {
11091126 // TODO: handle fails
11101127 let res = smol::block_on(language_server.goto_type_definition(doc.identifier(), pos))
11111128 .unwrap_or_default();
1112− goto(cx, res);
1129+ _goto(cx, res);
11131130}
11141131
11151132pub fn goto_implementation(cx: &mut Context) {
@@ -1125,7 +1142,7 @@ pub fn goto_implementation(cx: &mut Context) {
11251142 // TODO: handle fails
11261143 let res = smol::block_on(language_server.goto_implementation(doc.identifier(), pos))
11271144 .unwrap_or_default();
1128− goto(cx, res);
1145+ _goto(cx, res);
11291146}
11301147
11311148pub fn goto_reference(cx: &mut Context) {
@@ -1141,7 +1158,7 @@ pub fn goto_reference(cx: &mut Context) {
11411158 // TODO: handle fails
11421159 let res =
11431160 smol::block_on(language_server.goto_reference(doc.identifier(), pos)).unwrap_or_default();
1144− goto(cx, res);
1161+ _goto(cx, res);
11451162}
11461163
11471164pub fn signature_help(cx: &mut Context) {