mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
Add experimental support for update markdown links on file moves/renames (#157209)
* Add experimental support for update markdown links on file moves/renames Fixes #148146 This adds a new experimental setting that automatically updates markdown Note that this needs a new version of the vscode-markdown-languageservice so the build is expected to break for now * Pick up new LS version
This commit is contained in:
@@ -203,6 +203,15 @@ export async function startServer(connection: Connection) {
|
||||
return undefined;
|
||||
}));
|
||||
|
||||
connection.onRequest(protocol.getEditForFileRenames, (async (params, token: CancellationToken) => {
|
||||
try {
|
||||
return await provider!.getRenameFilesInWorkspaceEdit(params.map(x => ({ oldUri: URI.parse(x.oldUri), newUri: URI.parse(x.newUri) })), token);
|
||||
} catch (e) {
|
||||
console.error(e.stack);
|
||||
}
|
||||
return undefined;
|
||||
}));
|
||||
|
||||
documents.listen(connection);
|
||||
notebooks.listen(connection);
|
||||
connection.listen();
|
||||
|
||||
Reference in New Issue
Block a user