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
Dynamic registration of call hierarchy and type hierarchy is ignored, as it's looked up under textDocument/callHierarchy and textDocument/typeHierarchy #2250
LSP4IJ announces textDocument.callHierarchy.dynamicRegistration: true and textDocument.typeHierarchy.dynamicRegistration: true (ClientCapabilitiesFactory, lines 320 and 323). But a server that registers either feature dynamically never gets it: call and type hierarchy stay off for that server.
Cause
A dynamic registration names the request's method: textDocument/prepareCallHierarchy or textDocument/prepareTypeHierarchy, as in the spec. LSPClientFeatures.getCapabilityRegistry(String method) maps LSPRequestConstants.TEXT_DOCUMENT_CALL_HIERARCHY ("textDocument/callHierarchy") and TEXT_DOCUMENT_TYPE_HIERARCHY ("textDocument/typeHierarchy") to the feature registries. Those aren't LSP methods, so LanguageServerWrapper.registerCapability finds no registry for the real methods, and drops the registration.
Fix
Map TEXT_DOCUMENT_PREPARE_CALL_HIERARCHY and TEXT_DOCUMENT_PREPARE_TYPE_HIERARCHY, which LSPRequestConstants already defines, in getCapabilityRegistry. Keep the old keys too, in case a server uses them. Test it with a mock server that registers textDocument/prepareCallHierarchy dynamically.
Activity
fix: call hierarchy and type hierarchy work with a language server th…