-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
should enrich semantic highlighting. #9058
Comments
Maybe this is related to monaco version ? |
That's unlikely. Here's the error from Java LS:
I hope it helps to investigate the root cause of the problem. |
Same here. That actually appeared after upgrading the vscode-java extension to version 0.69.0. (JDK 15 support) The good news: after disabling both options (semantic highlighting) everything works as expected. I also had an older quarkus plugin with vscode-java 0.63.0 and that still works fine. So I guess it must have been broken somewhere in between 0.63.0 and 0.69.0. |
@nils-mosbach yes it's been re-enabled from 0.66.0
|
Hey, I just saw this issue and thought I'd do a quick investigation since I've contributed a large part of the new semantic highlighting implementation with semantic tokens in the Java language server used by the extension.
From reading the log (and experimenting on my own) the error doesn't seem to have anything to do with the semantic tokens. See #8412, which is about the same exact exception.
It's definitely related to the semantic tokens support in Monaco. The semantic tokens data arrives in correct shape to Theia, but the tokens aren't applied correctly (see microsoft/monaco-editor#1833). These are the main problems with how semantic tokens are applied in Theia/Monaco:
With this information in mind, I noticed it's actually possible to style the problematic semantic tokens in Theia by putting the semantic token rule in a TextMate rule, like so (from a VS Code color theme): {
"tokenColors": [
{
"scope": "class.declaration", // note, this is a semantic token rule, not really a TextMate scope
"settings": {
"foreground": "#FF0000"
}
}
]
} But again, this comes with limitations, and won't work for existing themes which will have all of their semantic token rules defined in What Theia and/or Monaco should probably do is (in order of importance):
Unless I'm missing something this problem shouldn't be unique to the Java extension, there are plenty of extensions providing semantic highlighting nowadays, such as the builtin TypeScript extension, rust-analyzer and the C# extension. But I'm guessing those extensions haven't been updated to the latest versions in Theia, which would explain why the problem hasn't occured (yet). I hope this can be of help, let me know if you have further questions about the semantic tokens. |
Bug Description:
Got that issue with vscode-java: when enabled, semantic highlighting is overriding existing syntax highlighting. It should enrich it.
Steps to Reproduce:
Additional Information
The text was updated successfully, but these errors were encountered: