aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/ctx.ts5
-rw-r--r--editors/code/src/installation/language_server.ts16
2 files changed, 12 insertions, 9 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index f0e2d72f7..70042a479 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -31,7 +31,10 @@ export class Ctx {
31 this.client = null; 31 this.client = null;
32 const client = await createClient(this.config); 32 const client = await createClient(this.config);
33 if (!client) { 33 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 );
35 } 38 }
36 39
37 this.pushCleanup(client.start()); 40 this.pushCleanup(client.start());
diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts
index 522d59eb5..d09fc63a7 100644
--- a/editors/code/src/installation/language_server.ts
+++ b/editors/code/src/installation/language_server.ts
@@ -72,19 +72,19 @@ export async function ensureLanguageServerBinary(
72 return langServerSource.path; 72 return langServerSource.path;
73 } 73 }
74 vscode.window.showErrorMessage( 74 vscode.window.showErrorMessage(
75 `Unable to execute ${'`'}${langServerSource.path} --version${'`'}. ` + 75 `Unable to run ${langServerSource.path} binary. ` +
76 "To use the bundled language server, set `rust-analyzer.raLspServerPath` " + 76 "To use the pre-built language server, set `rust-analyzer.raLspServerPath` " +
77 "value to `null` or remove it from the settings to use it by default." 77 "value to `null` or remove it from the settings to use it by default."
78 ); 78 );
79 return null; 79 return null;
80 } 80 }
81 case BinarySource.Type.GithubRelease: { 81 case BinarySource.Type.GithubRelease: {
82 const bundledBinaryPath = path.join(langServerSource.dir, langServerSource.file); 82 const prebuiltBinaryPath = path.join(langServerSource.dir, langServerSource.file);
83 83
84 if (!isBinaryAvailable(bundledBinaryPath)) { 84 if (!isBinaryAvailable(prebuiltBinaryPath)) {
85 const userResponse = await vscode.window.showInformationMessage( 85 const userResponse = await vscode.window.showInformationMessage(
86 `Language server binary for rust-analyzer was not found. ` + 86 "Language server binary for rust-analyzer was not found. " +
87 `Do you want to download it now?`, 87 "Do you want to download it now?",
88 "Download now", "Cancel" 88 "Download now", "Cancel"
89 ); 89 );
90 if (userResponse !== "Download now") return null; 90 if (userResponse !== "Download now") return null;
@@ -101,7 +101,7 @@ export async function ensureLanguageServerBinary(
101 101
102 102
103 assert( 103 assert(
104 isBinaryAvailable(bundledBinaryPath), 104 isBinaryAvailable(prebuiltBinaryPath),
105 "Downloaded language server binary is not functional" 105 "Downloaded language server binary is not functional"
106 ); 106 );
107 107
@@ -109,7 +109,7 @@ export async function ensureLanguageServerBinary(
109 "Rust analyzer language server was successfully installed 🦀" 109 "Rust analyzer language server was successfully installed 🦀"
110 ); 110 );
111 } 111 }
112 return bundledBinaryPath; 112 return prebuiltBinaryPath;
113 } 113 }
114 } 114 }
115 115