aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2019-12-08 19:08:46 +0000
committerLaurenČ›iu Nicola <[email protected]>2019-12-08 19:14:18 +0000
commitee2bc73d2a8bb5479019609b495c65d1d6132d9b (patch)
treee479ccc45e97f218b8d7276bf70693506449867a
parent6b1c2ee168151db07e42403c37106491ff45c5e6 (diff)
Code: don't check for ra_lsp_server on Windows
-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,