Skip to content

Mirror Cursor for JSX #51832

Description

@octref

microsoft/vscode#47069 implements this for HTML.

We should look for a way to support this for JSX/TSX.

Activity

  1. added this to the Backlog milestone on Nov 27, 2019
  2. svipas commented on Nov 27, 2019

    @svipas

    Pine (@octref) Finally, amazing news!

  3. mjbvz commented on Dec 10, 2019

    @mjbvz

    Pine (@octref) Can you please share a link to the code that implements this feature for html?

  4. octref commented on Dec 11, 2019

    @octref
    Author
  5. changed the title [-]JSX support for auto rename tag[/-] [+]Mirror Cursor for JSX[/+] on Dec 13, 2019
  6. sntran commented on Jan 2, 2020

    @sntran

    I would like to suggest an option for the languages that this feature can apply to. I work with XSL file and there is no mirror cursor. I could change the language to HTML, but I would loose formatting, highlighting, etc.. for XSL.

  7. Matelasse commented on Jan 31, 2020

    @Matelasse
  8. tifa2UP commented on Feb 8, 2020

    @tifa2UP
  9. cgarrovillo commented on Feb 17, 2020

    @cgarrovillo
  10. changed the title [-]Mirror Cursor for JSX[/-] [+][rename on type] Mirror Cursor for JSX[/+] on May 4, 2020
  11. changed the title [-][rename on type] Mirror Cursor for JSX[/-] [+]Mirror Cursor for JSX[/+] on May 4, 2020
  12. 24 remaining items

  13. mjbvz commented on Mar 6, 2023

    @mjbvz

    Isabel Duan (@iisaduan) I've updated the proposed protocol to more closely match VS Code / LSP. Here's the LSP linked editing spec for reference: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_linkedEditingRange

    This PR against VS Code also stubs out this feature using the proposed API: microsoft/vscode#176279 Let me know once you have something on the TS side and I will update the VS Code PR to match the actual protocol

  14. Cristy94 commented on Sep 20, 2023

    @Cristy94

    I see this issue is closed, but it still doesn't work for me. Is JSX linked editing supported?

  15. andresribeiro commented on Sep 20, 2023

    @andresribeiro

    Buleandra Cristian (@Cristy94) be sure that "editor.linkedEditing": true is set on settings.json. it's disabled by default

  16. Cristy94 commented on Sep 24, 2023

    @Cristy94

    Buleandra Cristian (@Cristy94) be sure that "editor.linkedEditing": true is set on settings.json. it's disabled by default

    Am I missing anything? Is there a shortcut for it? I didn't find any documentation for this feature.
    If I just edit the opening tag of a <div></div> element, the end tag is not updated.
    If I use CTRL+F2, all occurrences of "div" in that document are replaced.

  17. Cristy94 commented on Sep 24, 2023

    @Cristy94

    It seems to work for HTML (as expected, automatically edit, no keyboard shortcut needed). But for .jsx and .tsx it doesn't work or highlight the tags.

    image image image
  18. Cristy94 commented on Sep 24, 2023

    @Cristy94

    Found the issue, it doesn't work in TypeScript 5.0, and my editor was using the wrong version:

    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

CommittedThe team has roadmapped this issueDomain: APIRelates to the public API for TypeScriptDomain: LS: TSServerIssues related to the TSServerFix AvailableA PR has been opened for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions