Repository navigation
feat: show a late hover reply in a file whose languages register no documentation provider - #2130
Merged
Conversation
…ocumentation provider Fixes redhat-developer#2129 Since redhat-developer#2020, LSPDocumentationTargetProvider waits 500 ms at most for the textDocument/hover reply in a file that is not a plain text, TextMate or abstract file type file. The limit keeps a target whose reply has no documentation from hiding the file's own documentation: IntelliJ shows that only if no provider returns a target. A file whose languages register no documentation provider has none to hide, but got the limit too. When the server answered later, Quick Documentation showed nothing until it was asked again. Such a file now gets the LSPPendingHoverDocumentationTarget, as a plain text file does. LanguageDocumentation's allForLanguage leaves out the providers registered for any language, LSP4IJ's among them. Not changed: documentation that a plugin provides only for any language (documentationProvider) or through a psiTargetProvider is not seen. If the reply has no documentation, the pending target hides it, as in a plain text file. HoverWithoutWaitingTest's new test leaves out the documentation providers of the Properties language. It then gets a pending target in a .properties file. On main it gets no target.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2130 +/- ##
==========================================
+ Coverage 50.66% 50.95% +0.29%
==========================================
Files 816 820 +4
Lines 33910 34135 +225
Branches 5290 7033 +1743
==========================================
+ Hits 17180 17393 +213
- Misses 14066 14072 +6
- Partials 2664 2670 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 23, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 27, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 28, 2026
remaining.md and the register: LateHoverDocumentation shows a late hover on LSP4IJ 0.30.1, and the three versions the tour rejected first. It goes with its registration and its five reviewed internal APIs once a release has redhat-developer/lsp4ij#2130.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2129
What
Since #2020, Quick Documentation waits 500 ms at most for the
textDocument/hoverreply in a file that isn't a plain text, TextMate or abstract file type file, and shows a later reply only the next time at the same offset. In a file whose languages register no documentation provider, there is no documentation of the file's own for a target to hide. Still, the first Ctrl+Q showed nothing when the server took longer.Change
LSPDocumentationTargetProvider.hasNoDocumentationOfItsOwnalso counts a file whose languages register no documentation provider (registersNoDocumentationProvider). Such a file gets theLSPPendingHoverDocumentationTarget, as a plain text file does: the popup opens and shows the reply when it comes.LanguageDocumentation.INSTANCE.allForLanguagefor each language of the file's view provider. It is false if any of them has a provider, such as the HTML of a template file.allForLanguageleaves out the providers registered for any language, LSP4IJ'sLSPDocumentLinkDocumentationProviderandLSPSemanticTokenDocumentationProvideramong them.LSPFormattingFeature.isEnableddecides in the same way whether a file has a formatter of its own, withLanguageFormatting.INSTANCE.forContext(file).Not changed
documentationProvider) or through aplatform.backend.documentation.psiTargetProviderisn't seen. IntelliJ asks for those only when noDocumentationTargetProviderreturns a target. If the reply then has no documentation, the pending target hides theirs, as it already does in a plain text file.Test
HoverWithoutWaitingTest.testAFileWhoseLanguageRegistersNoDocumentationProviderGetsATargetWhichWaitsInTheBackground(new):ExtensionTestUtil.maskExtensions);.propertiesfile while the server holds its reply, and gets a pending target;On
mainit gets no target:Expected instance of: com.redhat.devtools.lsp4ij.features.documentation.LSPPendingHoverDocumentationTarget actual: null.The test of a file with documentation of its own now checks first that the Properties language has documentation providers.
mainfeatures.documentationtests andFeatureCacheOtherFileChangeTestwith the change