mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
vscode: minor names and message contents changes
This commit is contained in:
parent
fd6a98ef6e
commit
d08ae7e82f
2 changed files with 12 additions and 9 deletions
|
@ -31,7 +31,10 @@ export class Ctx {
|
||||||
this.client = null;
|
this.client = null;
|
||||||
const client = await createClient(this.config);
|
const client = await createClient(this.config);
|
||||||
if (!client) {
|
if (!client) {
|
||||||
throw new Error("Rust Analyzer Language Server is not available");
|
throw new Error(
|
||||||
|
"Rust Analyzer Language Server is not available. " +
|
||||||
|
"Please, ensure its [proper installation](https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#vs-code)."
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pushCleanup(client.start());
|
this.pushCleanup(client.start());
|
||||||
|
|
|
@ -72,19 +72,19 @@ export async function ensureLanguageServerBinary(
|
||||||
return langServerSource.path;
|
return langServerSource.path;
|
||||||
}
|
}
|
||||||
vscode.window.showErrorMessage(
|
vscode.window.showErrorMessage(
|
||||||
`Unable to execute ${'`'}${langServerSource.path} --version${'`'}. ` +
|
`Unable to run ${langServerSource.path} binary. ` +
|
||||||
"To use the bundled language server, set `rust-analyzer.raLspServerPath` " +
|
"To use the pre-built language server, set `rust-analyzer.raLspServerPath` " +
|
||||||
"value to `null` or remove it from the settings to use it by default."
|
"value to `null` or remove it from the settings to use it by default."
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
case BinarySource.Type.GithubRelease: {
|
case BinarySource.Type.GithubRelease: {
|
||||||
const bundledBinaryPath = path.join(langServerSource.dir, langServerSource.file);
|
const prebuiltBinaryPath = path.join(langServerSource.dir, langServerSource.file);
|
||||||
|
|
||||||
if (!isBinaryAvailable(bundledBinaryPath)) {
|
if (!isBinaryAvailable(prebuiltBinaryPath)) {
|
||||||
const userResponse = await vscode.window.showInformationMessage(
|
const userResponse = await vscode.window.showInformationMessage(
|
||||||
`Language server binary for rust-analyzer was not found. ` +
|
"Language server binary for rust-analyzer was not found. " +
|
||||||
`Do you want to download it now?`,
|
"Do you want to download it now?",
|
||||||
"Download now", "Cancel"
|
"Download now", "Cancel"
|
||||||
);
|
);
|
||||||
if (userResponse !== "Download now") return null;
|
if (userResponse !== "Download now") return null;
|
||||||
|
@ -101,7 +101,7 @@ export async function ensureLanguageServerBinary(
|
||||||
|
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
isBinaryAvailable(bundledBinaryPath),
|
isBinaryAvailable(prebuiltBinaryPath),
|
||||||
"Downloaded language server binary is not functional"
|
"Downloaded language server binary is not functional"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ export async function ensureLanguageServerBinary(
|
||||||
"Rust analyzer language server was successfully installed 🦀"
|
"Rust analyzer language server was successfully installed 🦀"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return bundledBinaryPath;
|
return prebuiltBinaryPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue