on master help sign in
Add command to run debug target
e2c74d2Dmitry Sharshakov
helix-term/src/commands.rs+10
@@ -304,6 +304,7 @@ impl Command {
304 select_textobject_inner, "Select inside object",
304 select_textobject_inner, "Select inside object",
305 dap_toggle_breakpoint, "Toggle breakpoint",
305 dap_toggle_breakpoint, "Toggle breakpoint",
306 dap_launch, "Launch debugger",
306 dap_launch, "Launch debugger",
307+ dap_run, "Begin program execution",
307 suspend, "Suspend"
308 suspend, "Suspend"
308 );
309 );
309}
310}
@@ -4326,3 +4327,12 @@ fn dap_launch(cx: &mut Context) {
4326 let _ = block_on(request).unwrap();
4327 let _ = block_on(request).unwrap();
4327 }
4328 }
4328}
4329}
4330+
4331+fn dap_run(cx: &mut Context) {
4332+ use helix_lsp::block_on;
4333+
4334+ if let Some(debugger) = &mut cx.editor.debugger {
4335+ let request = debugger.configuration_done();
4336+ let _ = block_on(request).unwrap();
4337+ }
4338+}
helix-term/src/keymap.rs+2−1
@@ -486,8 +486,9 @@ impl Default for Keymaps {
486 "a" => code_action,
486 "a" => code_action,
487 "'" => last_picker,
487 "'" => last_picker,
488 "d" => { "Debug"
488 "d" => { "Debug"
489+ "s" => dap_launch,
489 "b" => dap_toggle_breakpoint,
490 "b" => dap_toggle_breakpoint,
490− "r" => dap_launch,
491+ "r" => dap_run,
491 },
492 },
492 "w" => { "Window"
493 "w" => { "Window"
493 "C-w" | "w" => rotate_view,
494 "C-w" | "w" => rotate_view,