Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Add output channel #39

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 13 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export function activate(context: ExtensionContext) {
let rls_root = process.env.RLS_ROOT;
window.setStatusBarMessage("RLS analysis: starting up");

let outChannel = window.createOutputChannel('RLS-Standard err/out');


if (DEV_MODE) {
if (rls_root) {
serverOptions = {command: "cargo", args: ["run", "--release"], options: { cwd: rls_root } };
Expand All @@ -53,7 +56,16 @@ export function activate(context: ExtensionContext) {
} else {
childProcess = child_process.spawn("rls");
}
childProcess.stderr.on('data', data => {});
childProcess.stderr.on('data', data => {
outChannel.appendLine("Error");
outChannel.appendLine(data.toString());
});

childProcess.stdout.on('data', data => {
outChannel.appendLine("Output");
outChannel.appendLine(data.toString());
});

return childProcess; // Uses stdin/stdout for communication
}

Expand Down