Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/common/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ async function createServer(
let _disposables: Disposable[] = [];

export async function startServer(
context: vscode.ExtensionContext,
projectRoot: vscode.WorkspaceFolder,
workspaceSettings: ISettings,
serverId: string,
Expand All @@ -425,11 +426,13 @@ export async function startServer(

// Create output channels for the server and trace logs
const outputChannel = vscode.window.createOutputChannel(`${serverName} Language Server`);
_disposables.push(outputChannel);
context.subscriptions.push(outputChannel);
const traceOutputChannel = new LazyOutputChannel(`${serverName} Language Server Trace`);
_disposables.push(traceOutputChannel);
context.subscriptions.push(traceOutputChannel);
// And, a command to show the server logs
_disposables.push(registerCommand(`${serverId}.showServerLogs`, () => outputChannel.show()));
context.subscriptions.push(
registerCommand(`${serverId}.showServerLogs`, () => outputChannel.show()),
);

const extensionSettings = await getExtensionSettings(serverId);
const globalSettings = await getGlobalSettings(serverId);
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
}
}

lsClient = await startServer(projectRoot, workspaceSettings, serverId, serverName);
lsClient = await startServer(context, projectRoot, workspaceSettings, serverId, serverName);
} finally {
// Ensure that we reset the flag in case of an error, early return, or success.
restartInProgress = false;
Expand Down