aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/code/src/server.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts
index 2b4c25c28..3273d8749 100644
--- a/editors/code/src/server.ts
+++ b/editors/code/src/server.ts
@@ -1,9 +1,17 @@
1import { homedir } from 'os';
1import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
2 3
3import { window, workspace } from 'vscode'; 4import { window, workspace } from 'vscode';
4import { Config } from './config'; 5import { Config } from './config';
5import { Highlighter } from './highlighting'; 6import { Highlighter } from './highlighting';
6 7
8function expandPathResolving(path: string) {
9 if (path.startsWith('~/')) {
10 return path.replace('~', homedir());
11 }
12 return path;
13}
14
7export class Server { 15export class Server {
8 public static highlighter = new Highlighter(); 16 public static highlighter = new Highlighter();
9 public static config = new Config(); 17 public static config = new Config();
@@ -20,7 +28,7 @@ export class Server {
20 } 28 }
21 29
22 const run: lc.Executable = { 30 const run: lc.Executable = {
23 command: this.config.raLspServerPath, 31 command: expandPathResolving(this.config.raLspServerPath),
24 options: { cwd: folder } 32 options: { cwd: folder }
25 }; 33 };
26 const serverOptions: lc.ServerOptions = { 34 const serverOptions: lc.ServerOptions = {