diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-10 10:33:35 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-10 10:33:35 +0000 |
commit | 01b15c9fc2ce128149872ffe02de022bdb157286 (patch) | |
tree | a6cef1f978522423fa25a7f36b62be18d7aad0f8 /editors/code/src | |
parent | 166c72042564bc94586b071d627164a06400576b (diff) | |
parent | 48d6a52ac163c9316394f6c5027683f2c646ecaa (diff) |
Merge #776
776: Add support for a seperate output channel for trace messages r=DJMcNab a=DJMcNab
See https://github.com/Microsoft/vscode-languageserver-node/pull/444
I am just working on testing this now, but I think it should work.
Co-authored-by: DJMcNab <[email protected]>
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/server.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 0d2632708..9ead87fae 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as lc from 'vscode-languageclient'; | 1 | import * as lc from 'vscode-languageclient'; |
2 | 2 | ||
3 | import { window } from 'vscode'; | ||
3 | import { Config } from './config'; | 4 | import { Config } from './config'; |
4 | import { Highlighter } from './highlighting'; | 5 | import { Highlighter } from './highlighting'; |
5 | 6 | ||
@@ -19,16 +20,20 @@ export class Server { | |||
19 | run, | 20 | run, |
20 | debug: run | 21 | debug: run |
21 | }; | 22 | }; |
23 | const traceOutputChannel = window.createOutputChannel( | ||
24 | 'Rust Analyzer Language Server Trace' | ||
25 | ); | ||
22 | const clientOptions: lc.LanguageClientOptions = { | 26 | const clientOptions: lc.LanguageClientOptions = { |
23 | documentSelector: [{ scheme: 'file', language: 'rust' }], | 27 | documentSelector: [{ scheme: 'file', language: 'rust' }], |
24 | initializationOptions: { | 28 | initializationOptions: { |
25 | publishDecorations: true | 29 | publishDecorations: true |
26 | } | 30 | }, |
31 | traceOutputChannel | ||
27 | }; | 32 | }; |
28 | 33 | ||
29 | Server.client = new lc.LanguageClient( | 34 | Server.client = new lc.LanguageClient( |
30 | 'ra-lsp', | 35 | 'rust-analyzer', |
31 | 'rust-analyzer language server', | 36 | 'Rust Analyzer Language Server', |
32 | serverOptions, | 37 | serverOptions, |
33 | clientOptions | 38 | clientOptions |
34 | ); | 39 | ); |