diff --git a/package.json b/package.json index 8aa60d33..6f611e61 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,7 @@ "rust-client.disableRustup": { "type": "boolean", "default": false, - "description": "Disable usage of rustup and use rustc/rls from PATH." + "description": "Disable usage of rustup and use rustc/rls/rust-analyzer from PATH." }, "rust-client.channel": { "anyOf": [ diff --git a/src/rustAnalyzer.ts b/src/rustAnalyzer.ts index 459312ef..fd6837a1 100644 --- a/src/rustAnalyzer.ts +++ b/src/rustAnalyzer.ts @@ -216,8 +216,11 @@ export async function createLanguageClient( rustAnalyzer: { path?: string; releaseTag: string }; }, ): Promise { - await rustup.ensureToolchain(config.rustup); - await rustup.ensureComponents(config.rustup, REQUIRED_COMPONENTS); + if (!config.rustup.disabled) { + await rustup.ensureToolchain(config.rustup); + await rustup.ensureComponents(config.rustup, REQUIRED_COMPONENTS); + } + if (!config.rustAnalyzer.path) { await getServer({ askBeforeDownload: true,