Change:
position: vscode.Position, newName: string, token: vscode.CancellationToken <del> ): Promise<vscode.WorkspaceEdit | null> { const response = await this.execRename(document, position, token); if (!response || response.type !== 'response' || !response.body) { return null; </del> <ins> ): Promise<vscode.WorkspaceEdit | undefined> { const file = this.client.toOpenTsFilePath(document); if (!file) { return undefined; </ins> } <del> const renameInfo = response.body.info; if (!renameInfo.canRename) { return Promise.reject<vscode.WorkspaceEdit>(renameInfo.localizedErrorMessage); </del> <ins> const response = await this.execRename(document, position, token); if (!response || token.isCancellationRequested) { return undefined; </ins> } <del> if (renameInfo.fileToRename) { const edits = await this.renameFile(renameInfo.fileToRename, newName, token); if (edits) { return edits; } else { return Promise.reject<vscode.WorkspaceEdit>(vscode.l10n.t("An error occurred while renaming file")); </del> <ins> switch (response.type) { case 'rename': { const renameInfo = response.body.info; if (!renameInfo.canRename) { return Promise.reject<vscode.WorkspaceEdit>(renameInfo.localizedErrorMessage); } if (renameInfo.fileToRename) { const edits = await this.renameFile(renameInfo.fileToRename, newName, token); if (edits) { return edits; } else { return Promise.reject<vscode.WorkspaceEdit>(vscode.l10n.t("An error occurred while renaming file")); } } return this.updateLocs(response.body.locs, newName); } case 'jsxLinkedEditing': { return this.updateLocs([{ file, locs: response.spans.map((span): Proto.RenameTextSpan => ({ ...span })), }], newName); </ins> } } <del> return this.updateLocs(response.body.locs, newName); </del> } public async execRename( document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken <del> ): Promise<ServerResponse.Response<Proto.RenameResponse> | undefined> { </del> <ins> ): Promise<RenameResponse | undefined> { </ins> const file = this.client.toOpenTsFilePath(document); if (!file) { return undefined; } <ins> // Prefer renaming matching jsx tag when available if (this.client.apiVersion.gte(API.v510) && vscode.workspace.getConfiguration(this.language.id).get('preferences.renameMatchingJsxTags', true) && this.looksLikePotentialJsxTagContext(document, position) ) { const args = typeConverters.Position.toFileLocationRequestArgs(file, position); const response = await this.client.execute('linkedEditingRange', args, token); if (response.type !== 'response' || !response.body) { return undefined; } return { type: 'jsxLinkedEditing', spans: response.body.ranges }; } </ins> const args: Proto.RenameRequestArgs = { ...typeConverters.Position.toFileLocationRequestArgs(file, position), findInStrings: false, findInComments: false }; <del> return this.client.interruptGetErr(() => { </del> <ins> return this.client.interruptGetErr(async () => { </ins> this.fileConfigurationManager.ensureConfigurationForDocument(document, token); <del> return this.client.execute('rename', args, token); </del> <ins> const response = await this.client.execute('rename', args, token); if (response.type !== 'response' || !response.body) { return undefined; } return { type: 'rename', body: response.body }; </ins> }); } <ins> private looksLikePotentialJsxTagContext(document: vscode.TextDocument, position: vscode.Position): boolean { if (![languageIds.typescriptreact, languageIds.javascript, languageIds.javascriptreact].includes(document.languageId)) { return false; } const prefix = document.getText(new vscode.Range(position.line, 0, position.line, position.character)); return /</?s*[wd_$.]*$/.test(prefix); } </ins> private updateLocs( locations: ReadonlyArray<Proto.SpanGroup>, newName: string

Discussion:
!
<!-- -96bd-47a8-a0e8- --This feature request is now a candidate for our backlog. The community has 60 days to the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our . Happy Coding!
<!-- -c9e0-7adb-d31b- --:slightlysmilingface: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our . Happy Coding!
We closed this issue because we in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider. If you wonder what we are up to, please see our and . Thanks for your understanding, and happy coding!
Why has this been marked out of scope? This is a feature that was .
facing the same
Same problem here. This IS crucial for big projects.
To verify: renames should rename matching tags now. Test on both html tag names () and custom components () you change , then renaming custom components should instead renaming all references to that component