Use MD LS for resolving all document links (#160238)

* Use MD LS for resolving all document links

This switches the markdown extension to use the markdown language service when resolving the link. This lets us delete a lot of code that was duplicated between the extension and the LS

* Pick up new ls version
This commit is contained in:
Matt Bierner
2022-09-07 20:55:14 -07:00
committed by GitHub
parent 0d6bf703ce
commit 2d27f8db6a
25 changed files with 84 additions and 980 deletions

View File

@@ -207,6 +207,10 @@ export async function startServer(connection: Connection) {
return mdLs!.getRenameFilesInWorkspaceEdit(params.map(x => ({ oldUri: URI.parse(x.oldUri), newUri: URI.parse(x.newUri) })), token);
}));
connection.onRequest(protocol.resolveLinkTarget, (async (params, token: CancellationToken) => {
return mdLs!.resolveLinkTarget(params.linkText, URI.parse(params.uri), token);
}));
documents.listen(connection);
notebooks.listen(connection);
connection.listen();