on master help sign in
Remove shortcut for starting debug
commit235a84d989acb609ea34b423a45850d888a4038a authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateTue 24 Aug 2021, 20:32 (5 years ago) parent299da5a
3 files changed+4−12
helix-term/src/commands.rs−7 helix-term/src/keymap.rs−1 languages.toml+4−4
helix-term/src/commands.rs−7
@@ -305,7 +305,6 @@ impl Command {
305305 select_textobject_around, "Select around object",
306306 select_textobject_inner, "Select inside object",
307307 dap_toggle_breakpoint, "Toggle breakpoint",
308− dap_start, "Start debug session",
309308 dap_run, "Begin program execution",
310309 dap_continue, "Continue program execution",
311310 dap_pause, "Pause program execution",
@@ -4491,12 +4490,6 @@ fn dap_start_impl(editor: &mut Editor, name: Option<&str>, params: Option<Vec<&s
44914490 editor.debugger_events.push(stream);
44924491}
44934492
4494−fn dap_start(cx: &mut Context) {
4495− // TODO: check that first config does not have templates
4496− // which cannot be handled with a shortcut
4497− dap_start_impl(&mut cx.editor, None, None);
4498−}
4499−
45004493fn dap_toggle_breakpoint(cx: &mut Context) {
45014494 use helix_lsp::block_on;
45024495
helix-term/src/keymap.rs−1
@@ -486,7 +486,6 @@ impl Default for Keymaps {
486486 "a" => code_action,
487487 "'" => last_picker,
488488 "d" => { "Debug"
489− "s" => dap_start,
490489 "b" => dap_toggle_breakpoint,
491490 "r" => dap_run,
492491 "c" => dap_continue,
languages.toml+4−4
@@ -97,7 +97,7 @@ port-arg = "-p {}"
9797[[language.debugger.templates]]
9898name = "binary"
9999request = "launch"
100−args = { console = "internalConsole", program = "main" }
100+args = { console = "internalConsole", program = "{0}" }
101101
102102[[language.debugger.templates]]
103103name = "attach"
@@ -125,7 +125,7 @@ port-arg = "-p {}"
125125[[language.debugger.templates]]
126126name = "binary"
127127request = "launch"
128−args = { console = "internalConsole", program = "main" }
128+args = { console = "internalConsole", program = "{0}" }
129129
130130[[language.debugger.templates]]
131131name = "attach"
@@ -155,12 +155,12 @@ port-arg = "-l 127.0.0.1:{}"
155155[[language.debugger.templates]]
156156name = "source"
157157request = "launch"
158−args = { mode = "debug", program = "main.go" }
158+args = { mode = "debug", program = "{0}" }
159159
160160[[language.debugger.templates]]
161161name = "binary"
162162request = "launch"
163−args = { mode = "exec", program = "./main" }
163+args = { mode = "exec", program = "{0}" }
164164
165165[[language.debugger.templates]]
166166name = "test"