Skip to content

Commit 7a4ebd2

Browse files
committed
Remove vscode_lldb setting
1 parent e21bf1b commit 7a4ebd2

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pub struct Config {
1919

2020
pub with_sysroot: bool,
2121
pub publish_diagnostics: bool,
22-
// TODO: move to experimental capabilities
23-
pub vscode_lldb: bool,
2422
pub lru_capacity: Option<usize>,
2523
pub proc_macro_srv: Option<String>,
2624
pub files: FilesConfig,
@@ -78,7 +76,6 @@ impl Default for Config {
7876

7977
with_sysroot: true,
8078
publish_diagnostics: true,
81-
vscode_lldb: false,
8279
lru_capacity: None,
8380
proc_macro_srv: None,
8481
files: FilesConfig { watcher: FilesWatcher::Notify, exclude: Vec::new() },
@@ -122,7 +119,6 @@ impl Config {
122119

123120
set(value, "/withSysroot", &mut self.with_sysroot);
124121
set(value, "/featureFlags/lsp.diagnostics", &mut self.publish_diagnostics);
125-
set(value, "/vscodeLldb", &mut self.vscode_lldb);
126122
set(value, "/lruCapacity", &mut self.lru_capacity);
127123
if let Some(watcher) = get::<String>(value, "/files/watcher") {
128124
self.files.watcher = match watcher.as_str() {

crates/rust-analyzer/src/main_loop/handlers.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -810,23 +810,21 @@ pub fn handle_code_lens(
810810
};
811811
lenses.push(lens);
812812

813-
if world.config.vscode_lldb {
814-
if r.args[0] == "run" {
815-
r.args[0] = "build".into();
816-
} else {
817-
r.args.push("--no-run".into());
818-
}
819-
let debug_lens = CodeLens {
820-
range: r.range,
821-
command: Some(Command {
822-
title: "Debug".into(),
823-
command: "rust-analyzer.debugSingle".into(),
824-
arguments: Some(vec![to_value(r).unwrap()]),
825-
}),
826-
data: None,
827-
};
828-
lenses.push(debug_lens);
813+
if r.args[0] == "run" {
814+
r.args[0] = "build".into();
815+
} else {
816+
r.args.push("--no-run".into());
829817
}
818+
let debug_lens = CodeLens {
819+
range: r.range,
820+
command: Some(Command {
821+
title: "Debug".into(),
822+
command: "rust-analyzer.debugSingle".into(),
823+
arguments: Some(vec![to_value(r).unwrap()]),
824+
}),
825+
data: None,
826+
};
827+
lenses.push(debug_lens);
830828
}
831829

832830
// Handle impls

editors/code/src/commands/runnables.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export function debugSingle(ctx: Ctx): Cmd {
6666
return async (config: ra.Runnable) => {
6767
const editor = ctx.activeRustEditor;
6868
if (!editor) return;
69+
if (!vscode.extensions.getExtension("vadimcn.vscode-lldb")) {
70+
vscode.window.showErrorMessage("Install `vadimcn.vscode-lldb` extension for debugging");
71+
return;
72+
}
6973

7074
const debugConfig = {
7175
type: "lldb",

0 commit comments

Comments
 (0)