diff options
author | Aleksey Kladov <[email protected]> | 2019-12-31 16:28:01 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-31 16:28:01 +0000 |
commit | 433000be34eafd052addd91afd605a81e137a433 (patch) | |
tree | 95d30e894b6583f2d743fc94e3e866bc29750362 /editors/code/src/server.ts | |
parent | e4b588868f822b9c200a8ce77d24bfab5aeca4b8 (diff) |
Move config to Ctx
Diffstat (limited to 'editors/code/src/server.ts')
-rw-r--r-- | editors/code/src/server.ts | 5 |
1 files changed, 3 insertions, 2 deletions
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) { | |||
12 | } | 12 | } |
13 | 13 | ||
14 | export class Server { | 14 | export class Server { |
15 | public static config = new Config(); | 15 | static config: Config; |
16 | public static client: lc.LanguageClient; | 16 | public static client: lc.LanguageClient; |
17 | 17 | ||
18 | public static async start() { | 18 | public static async start(config: Config) { |
19 | // '.' Is the fallback if no folder is open | 19 | // '.' Is the fallback if no folder is open |
20 | // 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. | 20 | // 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. |
21 | let folder: string = '.'; | 21 | let folder: string = '.'; |
@@ -23,6 +23,7 @@ export class Server { | |||
23 | folder = workspace.workspaceFolders[0].uri.fsPath.toString(); | 23 | folder = workspace.workspaceFolders[0].uri.fsPath.toString(); |
24 | } | 24 | } |
25 | 25 | ||
26 | this.config = config; | ||
26 | const command = expandPathResolving(this.config.raLspServerPath); | 27 | const command = expandPathResolving(this.config.raLspServerPath); |
27 | const run: lc.Executable = { | 28 | const run: lc.Executable = { |
28 | command, | 29 | command, |