@@ -175,7 +175,7 @@ pub fn dap_start_impl(
175175 }
176176 };
177177
178− let language_config = editor.syn_loader.language_config_for_file_name(&path);
178+ let language_config = editor.syn_loader.language_config_for_file_name(path);
179179 let config = match language_config
180180 .as_deref()
181181 .and_then(|config| config.debugger.as_ref())
@@ -216,6 +216,7 @@ pub fn dap_start_impl(
216216
217217 debugger.quirks = config.quirks.clone();
218218
219+ // TODO: avoid refetching all of this... pass a config in
219220 let start_config = match name {
220221 Some(name) => config.templates.iter().find(|t| t.name == name),
221222 None => config.templates.get(0),
@@ -452,8 +453,8 @@ pub fn dap_toggle_breakpoint(cx: &mut Context) {
452453 let request = debugger.set_breakpoints(path.clone(), breakpoints);
453454 match block_on(request) {
454455 Ok(Some(breakpoints)) => {
455− let old_breakpoints = debugger.breakpoints.clone();
456− debugger.breakpoints = breakpoints.clone();
456+ // TODO: avoid this clone here
457+ let old_breakpoints = std::mem::replace(&mut debugger.breakpoints, breakpoints.clone());
457458 for bp in breakpoints {
458459 if !old_breakpoints.iter().any(|b| b.message == bp.message) {
459460 if let Some(msg) = &bp.message {