aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/client.ts')
-rw-r--r--editors/code/src/client.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index d72ecc58f..f909f8db2 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -30,15 +30,14 @@ export function configToServerOptions(config: Config) {
30 }; 30 };
31} 31}
32 32
33export async function createClient(config: Config, serverPath: string): Promise<lc.LanguageClient> { 33export async function createClient(config: Config, serverPath: string, cwd: string): Promise<lc.LanguageClient> {
34 // '.' Is the fallback if no folder is open 34 // '.' Is the fallback if no folder is open
35 // TODO?: Workspace folders support Uri's (eg: file://test.txt). 35 // TODO?: Workspace folders support Uri's (eg: file://test.txt).
36 // It might be a good idea to test if the uri points to a file. 36 // It might be a good idea to test if the uri points to a file.
37 const workspaceFolderPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? '.';
38 37
39 const run: lc.Executable = { 38 const run: lc.Executable = {
40 command: serverPath, 39 command: serverPath,
41 options: { cwd: workspaceFolderPath }, 40 options: { cwd },
42 }; 41 };
43 const serverOptions: lc.ServerOptions = { 42 const serverOptions: lc.ServerOptions = {
44 run, 43 run,