Skip to content

Commit

Permalink
fix(vscode): prevent the creation of multiple output channels for lan…
Browse files Browse the repository at this point in the history
…guage servers
  • Loading branch information
d-biehl committed Dec 23, 2024
1 parent 7f27b66 commit 56a0174
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vscode-client/extension/languageclientsmanger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ export class LanguageClientsManager {
}

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

let closeHandlerAction = CloseAction.DoNotRestart;

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

0 comments on commit 56a0174

Please sign in to comment.