Skip to content

Commit 56a0174

Browse files
committed
fix(vscode): prevent the creation of multiple output channels for language servers
1 parent 7f27b66 commit 56a0174

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vscode-client/extension/languageclientsmanger.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ export class LanguageClientsManager {
537537
}
538538

539539
const name = `RobotCode Language Server for folder ${workspaceFolder.name}`;
540+
const outputChannel = this.outputChannels.get(name) ?? vscode.window.createOutputChannel(name);
541+
this.outputChannels.set(name, outputChannel);
540542

541543
let closeHandlerAction = CloseAction.DoNotRestart;
542544

@@ -590,6 +592,7 @@ export class LanguageClientsManager {
590592
// TODO: how we can start a language client on workspace level, not on folder level
591593
workspaceFolder,
592594
revealOutputChannelOn: RevealOutputChannelOn.Error, // TODO: should we make this configurable?
595+
outputChannel,
593596
outputChannelName: name,
594597
markdown: {
595598
isTrusted: true,

0 commit comments

Comments
 (0)