You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Bend compiler already allows highlighting of diagnostic reporting through ANSI color escape codes - however, we're still not able to send highlighted messages to VSCode since it does not implement it yet.
Does it know how to handle (properly ignore) color escape codes?
If not, we can easily remove all of them from the language server diagnostics with a simple regex.
I wouldn't count on any external tool in particular implementing this. These things can be quite slow and are out of our control.
Does it know how to handle (properly ignore) color escape codes?
Not really, VSCode just prints the color escape codes as if they were in a raw string. Right now I'm implementing the regex you mentioned to remove these color codes in the language server's side.
Another way to deal with this would be to implement some sort of "is terminal?" check in the Bend compiler and avoid printing the color codes if it is not, like many other compilers do, and add a flag to force color printing if needed. Considering TSPL already prints messages with the color codes, I imagine the team would prefer the first solution I mentioned.
The Bend compiler already allows highlighting of diagnostic reporting through ANSI color escape codes - however, we're still not able to send highlighted messages to VSCode since it does not implement it yet.
Once microsoft/vscode#54272 is closed/merged, we will be able to easily implement this using a library like ansi_to_html.
The text was updated successfully, but these errors were encountered: