From 7a4ebd2c8dfee8ca15dab7ba053a6521840aa5e3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 2 Apr 2020 12:56:14 +0200 Subject: Remove vscode_lldb setting --- crates/rust-analyzer/src/config.rs | 4 ---- crates/rust-analyzer/src/main_loop/handlers.rs | 30 ++++++++++++-------------- 2 files changed, 14 insertions(+), 20 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 07fb8f16a..f3d8773cc 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -19,8 +19,6 @@ pub struct Config { pub with_sysroot: bool, pub publish_diagnostics: bool, - // TODO: move to experimental capabilities - pub vscode_lldb: bool, pub lru_capacity: Option, pub proc_macro_srv: Option, pub files: FilesConfig, @@ -78,7 +76,6 @@ impl Default for Config { with_sysroot: true, publish_diagnostics: true, - vscode_lldb: false, lru_capacity: None, proc_macro_srv: None, files: FilesConfig { watcher: FilesWatcher::Notify, exclude: Vec::new() }, @@ -122,7 +119,6 @@ impl Config { set(value, "/withSysroot", &mut self.with_sysroot); set(value, "/featureFlags/lsp.diagnostics", &mut self.publish_diagnostics); - set(value, "/vscodeLldb", &mut self.vscode_lldb); set(value, "/lruCapacity", &mut self.lru_capacity); if let Some(watcher) = get::(value, "/files/watcher") { self.files.watcher = match watcher.as_str() { diff --git a/crates/rust-analyzer/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs index db620dca3..b207f0764 100644 --- a/crates/rust-analyzer/src/main_loop/handlers.rs +++ b/crates/rust-analyzer/src/main_loop/handlers.rs @@ -810,23 +810,21 @@ pub fn handle_code_lens( }; lenses.push(lens); - if world.config.vscode_lldb { - if r.args[0] == "run" { - r.args[0] = "build".into(); - } else { - r.args.push("--no-run".into()); - } - let debug_lens = CodeLens { - range: r.range, - command: Some(Command { - title: "Debug".into(), - command: "rust-analyzer.debugSingle".into(), - arguments: Some(vec![to_value(r).unwrap()]), - }), - data: None, - }; - lenses.push(debug_lens); + if r.args[0] == "run" { + r.args[0] = "build".into(); + } else { + r.args.push("--no-run".into()); } + let debug_lens = CodeLens { + range: r.range, + command: Some(Command { + title: "Debug".into(), + command: "rust-analyzer.debugSingle".into(), + arguments: Some(vec![to_value(r).unwrap()]), + }), + data: None, + }; + lenses.push(debug_lens); } // Handle impls -- cgit v1.2.3