-
Notifications
You must be signed in to change notification settings - Fork 30
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
Problems with syntax highlighting and unary scope operator (C++) #254
Comments
I'll work on this before fixing the template syntax. And while I'm at it I'll clean up all of the |
Those scopes (with the extension) sound correct, although it is a shame the theme doesn't highlight |
Yeah because there should be support for that See https://github.com/microsoft/vscode/blob/master/extensions/theme-monokai/themes/monokai-color-theme.json#L208, maybe that change didn't make the 1.35.1 cut. Edit: yep 1.35.1 monokai theme is missing color for |
Copied From: microsoft/vscode-textmate#99
By @hassanbot
Original Issue
Hi! I'm not 100% sure this is the correct place to put this issue, so please redirect me if it should be placed somewhere else and I'll open one there.
Anyway, I'm having problems with the syntax highlighting when using the unary scope operator (to indicate global scope or anonymous namespace). Details below!
Steps to Reproduce:
1. Select the Monokai theme (though other themes probably work as well) through File -> Preferences -> Color Theme.
2. Create a .cpp file with the following code:
Expected syntax highlighting (in main function):
Namespaces: Green with underline.
Function calls: Green.
Strings: Yellow(ish).
Parentheses: White.
Semicolons: White.
Scope operators (::): White.
Resulting syntax highlighting:
Same as expected, except that the last call, using the scope resolution operator to indicate global scope shows in all white (see picture).
Using the TM Scope Inspector (Ctrl + Shift + P -> Developer: Inspect TM Scopes), the scopes for the first two calls to saySomething are:
Scope operator:
Function call
Parentheses
Strings
Semicolons
However, for the third call (
::saySomething
), the entire row (including scope operator, string, etc.) has the following scopes:In addition to this, the closing curly bracket of the main function also gets this scope if the call to ::saySomething is present. Otherwise it gets this scope:
The text was updated successfully, but these errors were encountered: