Serve call hierarchy from stock call facts

prepareCallHierarchy returns the callee definition as one item, and
callHierarchy/incomingCalls groups resolved call sites by the
innermost compiler-proven enclosing definition, falling back to an
explicit file-level caller. The server advertises
callHierarchyProvider. A real stdio session with the stock observer
prepared fnv1a64 (Hash.hpp) and reported one incoming call from
DocumentSnapshot.cpp.
This commit is contained in:
faumaray committed 2026-12-05 16:48:05 +03:00
1 parent 555ccecd65
commit cec4e7d717
6 files changed
+166 -2

No files matched your search

@@ -66,6 +66,12 @@ class EditorDiagnostics {
Documents::Range range) const;
// Semantic tokens for the document's proven occurrences, delta-encoded.
[[nodiscard]] Void::LanguageServer::Protocol::Json semantic_tokens(std::string_view uri) const;
// Call hierarchy at a call position: the callee definition as one item.
[[nodiscard]] Void::LanguageServer::Protocol::Json
call_hierarchy_prepare(std::string_view uri, Documents::Position position) const;
// Incoming calls of a prepared item, grouped by enclosing definition.
[[nodiscard]] Void::LanguageServer::Protocol::Json
call_hierarchy_incoming(const Void::LanguageServer::Protocol::Json &item) const;
// Parameter-type hints from the compiler signature, within the range.
[[nodiscard]] Void::LanguageServer::Protocol::Json inlay_hints(std::string_view uri,
Documents::Range range) const;