From 433000be34eafd052addd91afd605a81e137a433 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Dec 2019 17:28:01 +0100 Subject: Move config to Ctx --- editors/code/src/server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'editors/code/src/server.ts') diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 5dc8a36bd..ab9f3bfa6 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -12,10 +12,10 @@ function expandPathResolving(path: string) { } export class Server { - public static config = new Config(); + static config: Config; public static client: lc.LanguageClient; - public static async start() { + public static async start(config: Config) { // '.' 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. let folder: string = '.'; @@ -23,6 +23,7 @@ export class Server { folder = workspace.workspaceFolders[0].uri.fsPath.toString(); } + this.config = config; const command = expandPathResolving(this.config.raLspServerPath); const run: lc.Executable = { command, -- cgit v1.2.3