From ee4e41cbea8ef3758ccebd9ffb35c5290aebfceb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 Feb 2020 14:03:33 +0100 Subject: Push IO and error handling up --- editors/code/src/client.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'editors/code/src/client.ts') diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 11894973c..aaf2ef40e 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -2,18 +2,14 @@ import * as lc from 'vscode-languageclient'; import * as vscode from 'vscode'; import { Config } from './config'; -import { ensureServerBinary } from './installation/server'; import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; -export async function createClient(config: Config): Promise { +export async function createClient(config: Config, serverPath: string): Promise { // '.' Is the fallback if no folder is open // TODO?: Workspace folders support Uri's (eg: file://test.txt). // It might be a good idea to test if the uri points to a file. const workspaceFolderPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? '.'; - const serverPath = await ensureServerBinary(config.serverSource); - if (!serverPath) return null; - const run: lc.Executable = { command: serverPath, options: { cwd: workspaceFolderPath }, -- cgit v1.2.3