-
Notifications
You must be signed in to change notification settings - Fork 511
Version v2021.2.2 doesn't highlight the #Requires statements #3211
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
Comments
Incorrect. Unless your theme is marked as supporting semantic highlighting, you will 100% use the EditorSyntax grammar highlighting. (this is what the OP is running in to) Secondly, anything the symantic highlighting doesn't handle directly, falls back to the EditorSyntax grammar highlighting. Third, semantic highlighting was not intended to be a replacement for TextMate grammar's, but instead a supplement. TextMate is still going to handle things better and be more flexible. In the case of PowerShell, the symantic highlighter is almost useless, as everything can be determined by the TextMate grammar. I am not implying that the current EditorSyntax grammar handles everything, but that a TextMate grammar CAN handle everything PowerShell has to syntax, which so implemented. My suggestion, STOP semantically highlighting comments, and let that fall back on the TextMate grammar. Include in that Text Strings, as the semantic highlighting prevents the TextMate grammar from highlighting character escapes. (actually the sematic highlighting will fail on a text string (doublequote) if an intepolated variable appears, so it should just give up trying text strings in general.) |
Thanks everyone, we agree that we should mark comments so that they are not semantically highlighted, and fall back to the TextMate grammar |
There is also an issue where the methods are the same color as the variable which is calling the method. The code is very hard to read in general. I'm also using the Dark+ theme. |
As a workaround until semantic highlighting improves enough, you can disable it: #3221 (comment) |
Other issue I've had with the semantic highlighting are $true / $false / $null / $Script: etc. I feel like there should be a general catch all issue for highlighting at it's current state. I'd rather not spam issues with every semantic issue I find. |
@Cohors1316 good suggestions we will use #3221 |
Environment
Issue Description
I just opened some PowerShell scripts and the extension got updated. Right in front of my eyes, I had some #requires statements and they got their highlight stripped off.
Screenshots
Expected Behavior
The only Theme which still highlights those statements that I found is Night Owl. I have like 10 themes installed and went through all of them and the Night Owl is the only one.
Code Samples
The text was updated successfully, but these errors were encountered: