iliazeus / vscode-ansi

VS Code extension enabling ANSI color styling for text documents
https://marketplace.visualstudio.com/items?itemName=iliazeus.vscode-ansi
MIT License
57 stars 6 forks source link

Support [7m and [27m for invert color #17

Closed StephaneIFO closed 1 year ago

StephaneIFO commented 2 years ago

Hi,

Do you plan to support these escape codes in the future ? https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters

Steph

iliazeus commented 2 years ago

I am not sure if it can be implemented with the text decoration api at the moment. I can probably try using CSS filters for that?

iliazeus commented 1 year ago

Sadly, it probably can't be done with the way text editor decorations work in VS Code and the current extension architecture.

ericma15 commented 3 months ago

This Extensions support invert color. https://github.com/TobiasFaller/vscode-vt100-syntax-highlight . How does it do?

iliazeus commented 3 months ago

@ericma15 the extension you linked to uses a webview for its preview feature, losing some features in the process.

I explicitly made this extension to use VSCode's built-in editors instead of webviews. This means that, for example, any extension that inspects an editor's text will continue to work with this preview - like a spell checker, for example. Especially since, when I began development, even basic things, like Ctrl+F used to only work in built-in editors.

Unfortunately, this means that I'm constrained with the text decorations API, and it does not allow any way to invert colors.

ericma15 commented 3 months ago

thanks for your replaying. Now i know the reasons.