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
Hover: a hover cached before a language server was added or started is given again without that server's hover #2207
LSPHoverSupport keeps the future of the last hover of a file, and gives it again for a hover at the same offset while the file and the project's PSI are unchanged (AbstractLSPDocumentFeatureSupport.checkValid). Whether a language server was added, started or stopped since doesn't count. So a hover answered before a second language server of the file was ready keeps being given without that server's hover, until the file changes or the caret hovers elsewhere. Ctrl+hover on a semantic token (LSPSemanticTokenDocumentationProvider) and Quick Documentation both get it.
The caches are dropped when a language server stops (LanguageServerWrapper.disposeFileSupports) or the file closes, but not when a language server is added or starts.
How it was found
LSPSemanticTokenDocumentationProviderTest.testPlainTextOfTwoLanguageServers failed once on the Linux 2025.3 job of #2198, with only the first server's hover, right after testTheHoverOfALanguageServerWhenTheOtherOneCannotStart. A probe that hovers, adds a second language server and hovers again at the same offset, in one test, misses the second server's hover 9 times out of 10, and 0 times when the hover cache is cleared before the second hover.
Expected
A hover cached before a language server of the project was added, removed, started or stopped isn't given again. LanguageServiceAccessor already counts those changes in its modification tracker.
Test
Hover, add a second language server, hover again at the same offset: the second hover has both servers' hovers.
Activity
fix: a hover is asked again once a language server of the project was…
fix: a language server added while several projects are open starts o…