You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regular Java document highlighting broken in VSCode when extension is active #1380
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.
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)
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).
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)?
@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.
Activity
martinlippert commentedon Oct 9, 2024
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)
GH-1380: return null instead of empty list when there are no document…
martinlippert commentedon Oct 9, 2024
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)?
martinlippert commentedon Oct 9, 2024
Closing this here already, since the fix seems to work nicely. Nevertheless, we should look into the VSCode side as well @BoykoAlex.
BoykoAlex commentedon Oct 9, 2024
@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 ;-)
BoykoAlex commentedon Oct 9, 2024
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...
martinlippert commentedon Oct 10, 2024
@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.