Skip to content

Removed the output channels for the LS. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2021
Merged
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
10 changes: 0 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ interface DebugInfo {
let languageClient: LanguageClient | undefined;
let languageServerDisposable: vscode.Disposable | undefined;
let latestConfig: LanguageServerConfig | undefined;
let serverOutputChannel: vscode.OutputChannel | undefined;
let serverTraceChannel: vscode.OutputChannel | undefined;
let crashCount = 0;

export function activate(context: ExtensionContext) {
Expand Down Expand Up @@ -152,12 +150,6 @@ async function startLanguageServer(context: ExtensionContext, config: LanguageSe
}

async function buildLanguageClient(config: LanguageServerConfig): Promise<LanguageClient> {
if (!serverOutputChannel) {
serverOutputChannel = vscode.window.createOutputChannel('Arduino Language Server');
}
if (!serverTraceChannel) {
serverTraceChannel = vscode.window.createOutputChannel('Arduino Language Server (trace)');
}
const { lsPath: command, clangdPath, cliPath, board, flags, env, log } = config;
const args = ['-clangd', clangdPath, '-cli', cliPath, '-fqbn', board.fqbn];
if (board.name) {
Expand Down Expand Up @@ -196,8 +188,6 @@ async function buildLanguageClient(config: LanguageServerConfig): Promise<Langua
code2Protocol: (uri: vscode.Uri): string => (uri.scheme ? uri : uri.with({ scheme: 'file' })).toString(),
protocol2Code: (uri: string) => vscode.Uri.parse(uri)
},
outputChannel: serverOutputChannel,
traceOutputChannel: serverTraceChannel,
revealOutputChannelOn: RevealOutputChannelOn.Never,
initializationFailedHandler: (error: WebRequest.ResponseError<InitializeError>): boolean => {
vscode.window.showErrorMessage(`The language server is not able to serve any features. Initialization failed: ${error}.`);
Expand Down