-
Notifications
You must be signed in to change notification settings - Fork 206
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
regular Java document highlighting broken in VSCode when extension is active #1380
Comments
Maybe a similar issue as we had with semantic tokens not being merged when coming from different language servers? (just guessing here, came to my mind then looking into this) |
… hightlights found to avoid confusion on the client side
I looked into this and it seems like returning an empty list of document highlights causing the client to take only that empty list from the spring tools language server into account and ignoring other document highlight results (e.g. from the Java language server). Fixed with 16f4d0c. But probably worth to report this to VSCode itself and propose that document highlights coming from multiple sources are merged instead of "pick one and ignore the others". @BoykoAlex, what do you think? Interested in reporting this to VSCode (and maybe proposing a PR for that)? |
Closing this here already, since the fix seems to work nicely. Nevertheless, we should look into the VSCode side as well @BoykoAlex. |
@martinlippert I agree, yes, will report to VSCode... If I'm to work on the PR I'd start with semantic tokens though. It's been reported a while ago, it has been idle for a long time and it affects us more as we have rather ugly workaround ;-) |
Raised microsoft/vscode#230946 but I would not say we are affected much by this issue... The range is the parameter. If range is inside the query unlikely Java would provide anything. If the cursor is at Java method parameter and we'd like to highlight that parameter in the query then this would be a problem... I feel semantic tokens not merged is far more painful then this... |
@BoykoAlex Thanks for raising this with the VSCode team. And I agree that the fix that we have in place for now (returning null instead of an empty list) is good enough here. Once the VSCode piece got fixed, we can think about the special case that you mentioned. And yes, getting the semantic tokens merged is far more important, totally agree. |
This is the follow-up from redhat-developer/vscode-java#3787
Looks like regular document highlighting in Java source code is broken when the Spring Boot Tools extension is active.
The text was updated successfully, but these errors were encountered: