IBM-Cloud / vscode-log-output-colorizer

Language extension for VSCode that adds syntax colorization for both the output/debug/extensions panel and *.log files.
https://marketplace.visualstudio.com/items?itemName=IBM.output-colorizer
MIT License
111 stars 28 forks source link

how can I edit colors? #23

Open georgejecook opened 5 years ago

georgejecook commented 5 years ago

between your documentation and IBM's I can't figure out how I add new regex/s or change colors..

if I want to change colors, does that not mean I basically have to create my own extension, like yours?

confused..

kymikoloco commented 3 years ago

My warnings were getting colored as red so I went hunting. image

The tmLanguage has the TextMate scopes for the regex, like this for the warning scope. https://github.com/IBM-Cloud/vscode-log-output-colorizer/blob/26eb53df4c8a53b5d8f8dfa760137967bc56faf9/src/syntaxes/log.tmLanguage#L118-L123

In my settings.json I added this section to colorize it as yellow for me.

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "invalid.deprecated",
                "settings": {
                    "foreground": "#d1d425",
                }
            }
        ]
}

image

To add more regex, yes it does look like you'd need to write your own extension (or locally edit the tmLanguage file with extras, though that might not keep on updtes)

hanseltime commented 2 years ago

Hey all!

So I ran into this plugin and a similar problem with the output window not having any color support. I have a fork where I added the ability for a user to add their own regexes and semantics to the output stream.

In a few days, I'll see about adding a PR after adding testing. If anyone would like to try it out, the README is updated with instructions here:

https://github.com/hanseltime/vscode-log-output-colorizer

lonix1 commented 2 years ago

@kymikoloco Thanks for that! Do you know if it's possible to restrict the tweak to the log window only?

Because for example, if I use your trick to change string.quoted (instead of invalid.deprecated) it will change the color on ALL windows, everywhere in vscode.