aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-08 19:32:24 +0000
committerGitHub <[email protected]>2019-12-08 19:32:24 +0000
commite3a9e806bae14fbeb5d7369d7b7871ba87353316 (patch)
tree2dd44bb08c9c38435b4d28017fa302aad105e480
parenta38a3bf2298ceb0bf32cefbc18a427f50caeab84 (diff)
parentee2bc73d2a8bb5479019609b495c65d1d6132d9b (diff)
Merge #2508
2508: Code: don't check for ra_lsp_server on Windows r=matklad a=lnicola Workaround for https://github.com/rust-analyzer/rust-analyzer/pull/2503#issuecomment-562980020. ~~(not yet tested on Windows)~~ We can't run `ra_lsp_server --version` right now because the server doesn't seem to handle arguments (so it hangs). Co-authored-by: LaurenČ›iu Nicola <[email protected]>
-rw-r--r--editors/code/src/server.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts
index e717ab294..b346c0828 100644
--- a/editors/code/src/server.ts
+++ b/editors/code/src/server.ts
@@ -1,5 +1,5 @@
1import { lookpath } from 'lookpath'; 1import { lookpath } from 'lookpath';
2import { homedir } from 'os'; 2import { homedir, platform } from 'os';
3import * as lc from 'vscode-languageclient'; 3import * as lc from 'vscode-languageclient';
4 4
5import { window, workspace } from 'vscode'; 5import { window, workspace } from 'vscode';
@@ -29,10 +29,14 @@ export class Server {
29 } 29 }
30 30
31 const command = expandPathResolving(this.config.raLspServerPath); 31 const command = expandPathResolving(this.config.raLspServerPath);
32 if (!(await lookpath(command))) { 32 // FIXME: remove check when the following issue is fixed:
33 throw new Error( 33 // https://github.com/otiai10/lookpath/issues/4
34 `Cannot find rust-analyzer server \`${command}\` in PATH.` 34 if (platform() !== 'win32') {
35 ); 35 if (!(await lookpath(command))) {
36 throw new Error(
37 `Cannot find rust-analyzer server \`${command}\` in PATH.`
38 );
39 }
36 } 40 }
37 const run: lc.Executable = { 41 const run: lc.Executable = {
38 command, 42 command,