VSCode extension: How to render colored output in output channel?
问题 I have custom output from API and I want to format it to string with some colored values. 回答1: The output channel can be colorized with a TmLanguage grammar. The Output Colorizer extension extension does exactly that: You can do this by targeting the text/x-code-output mimetype: "contributes": { "languages": [{ "id": "code-output", "mimetypes": [ "text/x-code-output" ] }], "grammars": [{ "language": "code-output", "scopeName": "code.output", "path": "./syntaxes/code-output.tmLanguage" }] }