@@ -566,10 +566,6 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
566566 {" declarationProvider" , true },
567567 {" definitionProvider" , true },
568568 {" documentHighlightProvider" , true },
569- {" documentLinkProvider" ,
570- llvm::json::Object{
571- {" resolveProvider" , false },
572- }},
573569 {" hoverProvider" , true },
574570 {" renameProvider" , std::move (RenameProvider)},
575571 {" selectionRangeProvider" , true },
@@ -1204,25 +1200,6 @@ void ClangdLSPServer::onSelectionRange(
12041200 });
12051201}
12061202
1207- void ClangdLSPServer::onDocumentLink (
1208- const DocumentLinkParams &Params,
1209- Callback<std::vector<DocumentLink>> Reply) {
1210-
1211- // TODO(forster): This currently resolves all targets eagerly. This is slow,
1212- // because it blocks on the preamble/AST being built. We could respond to the
1213- // request faster by using string matching or the lexer to find the includes
1214- // and resolving the targets lazily.
1215- Server->documentLinks (
1216- Params.textDocument .uri .file (),
1217- [Reply = std::move (Reply)](
1218- llvm::Expected<std::vector<DocumentLink>> Links) mutable {
1219- if (!Links) {
1220- return Reply (Links.takeError ());
1221- }
1222- return Reply (std::move (Links));
1223- });
1224- }
1225-
12261203ClangdLSPServer::ClangdLSPServer (
12271204 class Transport &Transp, const FileSystemProvider &FSProvider,
12281205 const clangd::CodeCompleteOptions &CCOpts,
@@ -1266,7 +1243,6 @@ ClangdLSPServer::ClangdLSPServer(
12661243 MsgHandler->bind (" textDocument/typeHierarchy" , &ClangdLSPServer::onTypeHierarchy);
12671244 MsgHandler->bind (" typeHierarchy/resolve" , &ClangdLSPServer::onResolveTypeHierarchy);
12681245 MsgHandler->bind (" textDocument/selectionRange" , &ClangdLSPServer::onSelectionRange);
1269- MsgHandler->bind (" textDocument/documentLink" , &ClangdLSPServer::onDocumentLink);
12701246 // clang-format on
12711247}
12721248
0 commit comments