@@ -170,11 +170,11 @@ pub fn dap_start_impl(
175− .language_config_for_file_name(&path)
173+ let language_config = editor.syn_loader.language_config_for_file_name(&path);
176− .and_then(|x| x.debugger.clone());
177− let config = match config {
174+ let config = match language_config
176+ .and_then(|config| config.debugger.as_ref())
178 Some(c) => c,
178 Some(c) => c,
179 None => {
179 None => {
180 editor.set_error(
180 editor.set_error(
@@ -187,10 +187,10 @@ pub fn dap_start_impl(
187 let result = match socket {
187 let result = match socket {
188 Some(socket) => block_on(Client::tcp(socket, 0)),
188 Some(socket) => block_on(Client::tcp(socket, 0)),
189 None => block_on(Client::process(
189 None => block_on(Client::process(
190− config.transport.clone(),
190+ &config.transport,
191− config.command.clone(),
191+ &config.command,
192− config.args.clone(),
192+ config.args.iter().map(|arg| arg.as_str()).collect(),
193− config.port_arg.clone(),
193+ config.port_arg.as_deref(),
@@ -209,7 +209,7 @@ pub fn dap_start_impl(
212− debugger.quirks = config.quirks;
212+ debugger.quirks = config.quirks.clone();
214 let start_config = match name {
214 let start_config = match name {
215 Some(name) => config.templates.iter().find(|t| t.name == name),
215 Some(name) => config.templates.iter().find(|t| t.name == name),
@@ -296,7 +296,7 @@ pub fn dap_launch(cx: &mut Context) {
297 let (_, doc) = current!(cx.editor);
297 let (_, doc) = current!(cx.editor);
298 let path = match doc.path() {
298 let path = match doc.path() {
299− Some(path) => path.to_path_buf(),
299+ Some(path) => path,
300 None => {
300 None => {
301 cx.editor
301 cx.editor
302 .set_error("Can't start debug: document has no path".to_string());
302 .set_error("Can't start debug: document has no path".to_string());
@@ -304,12 +304,11 @@ pub fn dap_launch(cx: &mut Context) {
310− .language_config_for_file_name(&path)
307+ let language_config = cx.editor.syn_loader.language_config_for_file_name(path);
308+ let config = match language_config
311− .and_then(|x| x.debugger.clone());
310+ .and_then(|config| config.debugger.as_ref())
312− let config = match config {
311+ {
313 Some(c) => c,
312 Some(c) => c,
314 None => {
313 None => {
315 cx.editor.set_error(
314 cx.editor.set_error(
@@ -321,7 +320,7 @@ pub fn dap_launch(cx: &mut Context) {
322 cx.push_layer(Box::new(Picker::new(
321 cx.push_layer(Box::new(Picker::new(
324− config.templates,
323+ config.templates.clone(),
325 |template| template.name.as_str().into(),
324 |template| template.name.as_str().into(),
326 |cx, template, _action| {
325 |cx, template, _action| {
327 let completions = template.completion.clone();
326 let completions = template.completion.clone();