diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/server.ts | 10 |
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 @@ | |||
1 | import { homedir } from 'os'; | ||
1 | import * as lc from 'vscode-languageclient'; | 2 | import * as lc from 'vscode-languageclient'; |
2 | 3 | ||
3 | import { window, workspace } from 'vscode'; | 4 | import { window, workspace } from 'vscode'; |
4 | import { Config } from './config'; | 5 | import { Config } from './config'; |
5 | import { Highlighter } from './highlighting'; | 6 | import { Highlighter } from './highlighting'; |
6 | 7 | ||
8 | function expandPathResolving(path: string) { | ||
9 | if (path.startsWith('~/')) { | ||
10 | return path.replace('~', homedir()); | ||
11 | } | ||
12 | return path; | ||
13 | } | ||
14 | |||
7 | export class Server { | 15 | export 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 = { |