@@ -170,11 +170,11 @@ pub fn dap_start_impl(
170170 }
171171 };
172172
173− let config = editor
174− .syn_loader
175− .language_config_for_file_name(&path)
176− .and_then(|x| x.debugger.clone());
177− let config = match config {
173+ let language_config = editor.syn_loader.language_config_for_file_name(&path);
174+ let config = match language_config
175+ .as_deref()
176+ .and_then(|config| config.debugger.as_ref())
177+ {
178178 Some(c) => c,
179179 None => {
180180 editor.set_error(
@@ -187,10 +187,10 @@ pub fn dap_start_impl(
187187 let result = match socket {
188188 Some(socket) => block_on(Client::tcp(socket, 0)),
189189 None => block_on(Client::process(
190− config.transport.clone(),
191− config.command.clone(),
192− config.args.clone(),
193− config.port_arg.clone(),
190+ &config.transport,
191+ &config.command,
192+ config.args.iter().map(|arg| arg.as_str()).collect(),
193+ config.port_arg.as_deref(),
194194 0,
195195 )),
196196 };
@@ -209,7 +209,7 @@ pub fn dap_start_impl(
209209 return;
210210 }
211211
212− debugger.quirks = config.quirks;
212+ debugger.quirks = config.quirks.clone();
213213
214214 let start_config = match name {
215215 Some(name) => config.templates.iter().find(|t| t.name == name),
@@ -296,7 +296,7 @@ pub fn dap_launch(cx: &mut Context) {
296296
297297 let (_, doc) = current!(cx.editor);
298298 let path = match doc.path() {
299− Some(path) => path.to_path_buf(),
299+ Some(path) => path,
300300 None => {
301301 cx.editor
302302 .set_error("Can't start debug: document has no path".to_string());
@@ -304,12 +304,11 @@ pub fn dap_launch(cx: &mut Context) {
304304 }
305305 };
306306
307− let config = cx
308− .editor
309− .syn_loader
310− .language_config_for_file_name(&path)
311− .and_then(|x| x.debugger.clone());
312− let config = match config {
307+ let language_config = cx.editor.syn_loader.language_config_for_file_name(path);
308+ let config = match language_config
309+ .as_deref()
310+ .and_then(|config| config.debugger.as_ref())
311+ {
313312 Some(c) => c,
314313 None => {
315314 cx.editor.set_error(
@@ -321,7 +320,7 @@ pub fn dap_launch(cx: &mut Context) {
321320
322321 cx.push_layer(Box::new(Picker::new(
323322 true,
324− config.templates,
323+ config.templates.clone(),
325324 |template| template.name.as_str().into(),
326325 |cx, template, _action| {
327326 let completions = template.completion.clone();