chore(vscode): update to 1.53.2

These conflicts will be resolved in the following commits. We do it this way so
that PR review is possible.
This commit is contained in:
Joe Previte
2021-02-25 11:27:27 -07:00
1900 changed files with 83066 additions and 64589 deletions

View File

@@ -188,6 +188,28 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
}
return null;
},
async doRename(document: TextDocument, position: Position, newName: string) {
const jsDocument = jsDocuments.get(document);
const jsLanguageService = await host.getLanguageService(jsDocument);
const jsDocumentPosition = jsDocument.offsetAt(position);
const { canRename } = jsLanguageService.getRenameInfo(jsDocument.uri, jsDocumentPosition);
if (!canRename) {
return null;
}
const renameInfos = jsLanguageService.findRenameLocations(jsDocument.uri, jsDocumentPosition, false, false);
const edits: TextEdit[] = [];
renameInfos?.map(renameInfo => {
edits.push({
range: convertRange(jsDocument, renameInfo.textSpan),
newText: newName,
});
});
return {
changes: { [document.uri]: edits },
};
},
async findDocumentHighlight(document: TextDocument, position: Position): Promise<DocumentHighlight[]> {
const jsDocument = jsDocuments.get(document);
const jsLanguageService = await host.getLanguageService(jsDocument);