Skip to content

Commit d08ae7e

Browse files
author
Veetaha
committed
vscode: minor names and message contents changes
1 parent fd6a98e commit d08ae7e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

editors/code/src/ctx.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ export class Ctx {
3131
this.client = null;
3232
const client = await createClient(this.config);
3333
if (!client) {
34-
throw new Error("Rust Analyzer Language Server is not available");
34+
throw new Error(
35+
"Rust Analyzer Language Server is not available. " +
36+
"Please, ensure its [proper installation](https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#vs-code)."
37+
);
3538
}
3639

3740
this.pushCleanup(client.start());

editors/code/src/installation/language_server.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ export async function ensureLanguageServerBinary(
7272
return langServerSource.path;
7373
}
7474
vscode.window.showErrorMessage(
75-
`Unable to execute ${'`'}${langServerSource.path} --version${'`'}. ` +
76-
"To use the bundled language server, set `rust-analyzer.raLspServerPath` " +
75+
`Unable to run ${langServerSource.path} binary. ` +
76+
"To use the pre-built language server, set `rust-analyzer.raLspServerPath` " +
7777
"value to `null` or remove it from the settings to use it by default."
7878
);
7979
return null;
8080
}
8181
case BinarySource.Type.GithubRelease: {
82-
const bundledBinaryPath = path.join(langServerSource.dir, langServerSource.file);
82+
const prebuiltBinaryPath = path.join(langServerSource.dir, langServerSource.file);
8383

84-
if (!isBinaryAvailable(bundledBinaryPath)) {
84+
if (!isBinaryAvailable(prebuiltBinaryPath)) {
8585
const userResponse = await vscode.window.showInformationMessage(
86-
`Language server binary for rust-analyzer was not found. ` +
87-
`Do you want to download it now?`,
86+
"Language server binary for rust-analyzer was not found. " +
87+
"Do you want to download it now?",
8888
"Download now", "Cancel"
8989
);
9090
if (userResponse !== "Download now") return null;
@@ -101,15 +101,15 @@ export async function ensureLanguageServerBinary(
101101

102102

103103
assert(
104-
isBinaryAvailable(bundledBinaryPath),
104+
isBinaryAvailable(prebuiltBinaryPath),
105105
"Downloaded language server binary is not functional"
106106
);
107107

108108
vscode.window.showInformationMessage(
109109
"Rust analyzer language server was successfully installed 🦀"
110110
);
111111
}
112-
return bundledBinaryPath;
112+
return prebuiltBinaryPath;
113113
}
114114
}
115115

0 commit comments

Comments
 (0)