diff options
| author | gentoo90 <gentoo90@gmail.com> | 2019-01-05 17:28:41 +0200 |
|---|---|---|
| committer | gentoo90 <gentoo90@gmail.com> | 2019-01-05 17:28:41 +0200 |
| commit | a6e04cfa7fbc2baaf5fabb8a07093034d4d761e4 (patch) | |
| tree | 43a703571f0e10dc619bbab959be002c9970c676 /editors/code/src | |
| parent | 8d51b02362109d71355aed63d48b5e7ccd0e51f4 (diff) | |
| download | rust-a6e04cfa7fbc2baaf5fabb8a07093034d4d761e4.tar.gz rust-a6e04cfa7fbc2baaf5fabb8a07093034d4d761e4.zip | |
Allow user to set path to ra_lsp_server in vscode settings
Diffstat (limited to 'editors/code/src')
| -rw-r--r-- | editors/code/src/config.ts | 5 | ||||
| -rw-r--r-- | editors/code/src/server.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 7d05ea078ca..cd0c6e6e29f 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -4,6 +4,7 @@ import { Server } from './server'; export class Config { public highlightingOn = true; + public raLspServerPath = 'ra_lsp_server'; constructor() { vscode.workspace.onDidChangeConfiguration(_ => @@ -21,5 +22,9 @@ export class Config { if (!this.highlightingOn && Server) { Server.highlighter.removeHighlights(); } + + if (config.has('raLspServerPath')) { + this.raLspServerPath = config.get('raLspServerPath') as string; + } } } diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 75bdf320708..35fb7e3f50b 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -12,7 +12,7 @@ export class Server { notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]> ) { const run: lc.Executable = { - command: 'ra_lsp_server', + command: this.config.raLspServerPath, options: { cwd: '.' } }; const serverOptions: lc.ServerOptions = { |
