-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote Development breaks Semantic Coloring #3942
Comments
Updated because I can't proof read. |
Hi @ablackle . Thanks for reporting this. This is currently a limitation, as there is not an API to access color settings in themes ( microsoft/vscode#32813 ). We parse the current theme file directly to look up colors. When remoting, cpptools is running on the remote machine, but the themes are on the local machine, so cpptools is unable to access them. Colors overridden in user settings are applied, however. We are working with the core VS Code team on better facilitating semantic colorization, and will revisit this as soon as we can. |
Do you have any examples for how to override colors in user settings? It would be nice if I could just copy colors from my theme into settings until this gets properly fixed. I tried setting several of the scopes listed on https://code.visualstudio.com/docs/cpp/colorization-cpp in my remote machine's settings.json, but nothing changed. What I tried: "editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"variable.other.local",
"variable.other.global",
"variable.parameter",
"variable.other.property.cli"
],
"settings": {
"foreground": "#FF0000"
}
}
]
} |
Hi @ChaosinaCan . Thanks for reporting this. It looks like the failure to find the theme files may be causing semantic colorization to abort instead of proceed with what settings are available. I will investigate. Also, there are a number of scopes not included in the documentation (as they were existing scopes, not newly added), which would also need to be added in settings, as we are also reading those from theme files. We'll need to publish a full list to enable working around the issue using settings. If you haven't already, please upvote this issue: microsoft/vscode#32813 :) |
Already upvoted. Thanks! |
I'm having the same problem when using Windows Subsystem for Linux. Anyone find any solutions? |
I too would very much like to have this issue resolved. Until the enhanced colorization is functional via remote development, I will continue to use the clunky Eclipse C++ editor |
I'm using WSL2 to develop for Linux and have also problems with the C++ syntax highlighting with my installed theme (Dracula). Is this the same problem as described here? Here are some pictures: I dont want to open a new issue if this is caused by the same problem. Also the issue: microsoft/vscode#32813 that seems to be the solution to this is from 2017. Is it still planned as a milestone? I was really looking forward to using WSL2 with the new Windows Update and not relying on virtual machines anymore. |
@sean-mcmanus Do you have any information about when users can expect #4992 to be shipped? |
@KentoNishi It got delayed because we needed VS Code to update some themes. It should get into 0.29.0 in July (maybe earlier in a C/C++ 0.29.0-insiders release if VS Code Insiders has the updated themes). |
Considering this fixed with #4992 . If this scenario still occurs, it would be an issue with VS Code's semantic highlighting support. |
when is 0.29.0 supposed to ship? I tried the insiders update to no avail. Looking forward to having the enhanced colors soon! |
@cSchubes Next week (0.29.0-insiders2). |
Please also note that you will need to use the VS Code Insiders build to make this work until the June 2020 release ships (which should also be very soon). The VS Code changes that support this are in 1.47. |
Remote colorization is available with https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders2 , but I believe you would also need VS Code version 1.47 as well (which is still in Insiders) . Let us know if you hit any issues with it. |
Prior to VS Code 1.47, using a Color Theme that does not opt in for semantic highlighting will cause semantic highlighting to be disabled, regardless of the value of the However, the following setting appears to work around that:
If using a theme that opts in for semantic highlighting (such as all built-in VS Code themes), I believe those should work fine. |
@sean-mcmanus @Colengms can confirm this works with 0.29.0-insiders2 and VS Code 1.47 Insiders. Amazing stuff! So happy to have my fancy colors back!! |
After updating to 0.29.0-insiders2, I too can confirm that enhanced colourisation works. However, the colours i have defined in my settings.json, like in the comment below, are no longer applied to the code. How do i customise semantic coloring now? |
Hi @jheaff1 . To confirm, are you using either VS Code >=1.47 (currently VS Code insiders) or have specified the following?
If you've done either of these things and are not getting the colors you expect, could you open a new issue and indicate which theme and related settings you are using? |
I am seeing an issue where after enabling/disabling semantic highlighting, you may have reload the window or edit the file in order to cause VS Code to issue a fresh request for semantic tokens. |
@Colengms We could show the Reload dialog like we do in some other cases. |
@Colengms adding "semanticTokenColorCustomizations" to my settings.json made it all work, thank you! |
Semantic colorization works with remote development with 0.29.0. |
Using VSC's Remote Development extension pack.
Using RHEL 7 as a server, and Windows 10 as a client.
C/C++ 0.24.0 installed on the server.
Semantic coloring is missing instances. This does not occur in my local Windows VSC, local Windows VSC Insiders, or remote RHEL VSC (via VNC).
This is the expected result.

This is the image with the missing coloring.

The text was updated successfully, but these errors were encountered: