Output Channel not coloring keywords anymore
- VSCode Version: 1.0.0
- OS Version: Windows 7 SP1
Steps to Reproduce:
- Make a simple extension:
let output = vscode.window.createOutputChannel( 'CM' );
output.appendLine( "warning: nothing" );
output.appendLine( "[warning not colored]" );
- Previously, using certain keywords in this fashion would be colored.
I know there are plans in the future to allow more advanced coloring in output channels, but my extension was using this as a workaround to callout important output.
Before:

After:

@bpasero I see that we only handle ansi output for repl, have we ever done this for output? How was this working before might you know?
@isidorn check if output mode is still properly being used: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/output/common/outputMode.ts
@bpasero I think it is still properly used since I see the links are nicely computed in the output. I also see it properly registered here
If there is another way to color the output, I'd love to do it that way versus wrapping my lines with [Error ...] and [Warning ..] etc :smile:
I can reproduce. @aeschli could this be a regression from theme work? The output mode applies tokens like token error-token output Log and these do not get coloured anymore.
More tokens are outlined here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/output/common/outputMode.ts#L32
Yes, the error-token rules got removed. Feel free to add it again to token.css
It looks like this commit earlier this month has removed the ability to color the output described above:
https://github.com/Microsoft/vscode/commit/9a57fba48c0c20d5a9a6dec6f35c6d63e0aa5e2d#diff-0ae4fd008d20fc694925b1e837ac1cc2
Is there a way to color the output still? Or is this no longer supported?
Yes, that coloring story was not good at all. We need support for a) ANSI coloring in the output panel and maybe b) a way for an output channel to contribute rules for tokenization. Coming up with some hard coded keywords (info, error, warning) does not solve it for extensions in general.
Sounds good, I'll let me users know its not possible at the moment, thanks!