diff options
| author | Jonas Schievink <jonas.schievink@ferrous-systems.com> | 2023-01-31 15:43:47 +0100 |
|---|---|---|
| committer | Jonas Schievink <jonas.schievink@ferrous-systems.com> | 2023-01-31 15:43:47 +0100 |
| commit | 56f81ebc3e52ac7e6dd8a3359e290d8765975edc (patch) | |
| tree | 8e8be005ade8930cb039b79edf8952fb191b2040 /editors/code/src/ctx.ts | |
| parent | d805c74c51888b3308c7577e747d50d6a6f1dc9b (diff) | |
| download | rust-56f81ebc3e52ac7e6dd8a3359e290d8765975edc.tar.gz rust-56f81ebc3e52ac7e6dd8a3359e290d8765975edc.zip | |
Lazily create the trace output channel
Diffstat (limited to 'editors/code/src/ctx.ts')
| -rw-r--r-- | editors/code/src/ctx.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 8b04182155d..e2a30e0cc45 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts @@ -4,7 +4,7 @@ import * as ra from "./lsp_ext"; import { Config, substituteVSCodeVariables } from "./config"; import { createClient } from "./client"; -import { isRustDocument, isRustEditor, log, RustEditor } from "./util"; +import { isRustDocument, isRustEditor, LazyOutputChannel, log, RustEditor } from "./util"; import { ServerStatusParams } from "./lsp_ext"; import { PersistentState } from "./persistent_state"; import { bootstrap } from "./bootstrap"; @@ -128,9 +128,7 @@ export class Ctx { } if (!this.traceOutputChannel) { - this.traceOutputChannel = vscode.window.createOutputChannel( - "Rust Analyzer Language Server Trace" - ); + this.traceOutputChannel = new LazyOutputChannel("Rust Analyzer Language Server Trace"); this.pushExtCleanup(this.traceOutputChannel); } if (!this.outputChannel) { |
