Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Fix: respect rust-client.disableRustup setting when using rust-anyzer #827

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
7 changes: 5 additions & 2 deletions src/rustAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,11 @@ export async function createLanguageClient(
rustAnalyzer: { path?: string; releaseTag: string };
},
): Promise<lc.LanguageClient> {
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,
Expand Down