mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 18:06:18 +04:00
Add command to run debug target
This commit is contained in:
parent
c4970c617e
commit
e2c74d26e0
@ -304,6 +304,7 @@ pub fn doc(&self) -> &'static str {
|
|||||||
select_textobject_inner, "Select inside object",
|
select_textobject_inner, "Select inside object",
|
||||||
dap_toggle_breakpoint, "Toggle breakpoint",
|
dap_toggle_breakpoint, "Toggle breakpoint",
|
||||||
dap_launch, "Launch debugger",
|
dap_launch, "Launch debugger",
|
||||||
|
dap_run, "Begin program execution",
|
||||||
suspend, "Suspend"
|
suspend, "Suspend"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -4326,3 +4327,12 @@ fn dap_launch(cx: &mut Context) {
|
|||||||
let _ = block_on(request).unwrap();
|
let _ = block_on(request).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn dap_run(cx: &mut Context) {
|
||||||
|
use helix_lsp::block_on;
|
||||||
|
|
||||||
|
if let Some(debugger) = &mut cx.editor.debugger {
|
||||||
|
let request = debugger.configuration_done();
|
||||||
|
let _ = block_on(request).unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -486,8 +486,9 @@ fn default() -> Keymaps {
|
|||||||
"a" => code_action,
|
"a" => code_action,
|
||||||
"'" => last_picker,
|
"'" => last_picker,
|
||||||
"d" => { "Debug"
|
"d" => { "Debug"
|
||||||
|
"s" => dap_launch,
|
||||||
"b" => dap_toggle_breakpoint,
|
"b" => dap_toggle_breakpoint,
|
||||||
"r" => dap_launch,
|
"r" => dap_run,
|
||||||
},
|
},
|
||||||
"w" => { "Window"
|
"w" => { "Window"
|
||||||
"C-w" | "w" => rotate_view,
|
"C-w" | "w" => rotate_view,
|
||||||
|
Loading…
Reference in New Issue
Block a user