Skip to content

Auto Rename Tag #130

Description

@bmix

I just realized, with the help of @angelozerr at lsp4xml/#362, that synced renaming and deletion of two tags, that belong together, may best be done via some simple text manipulation on the client side. I now have installed a little extension into VSCode, that does just that (minus paired delete, sadly), but it may well fit also into your project, so to keep things together.

Activity

  1. fbricon commented on Nov 29, 2019

    @fbricon
    Collaborator

    @angelozerr @xorye @NikolasKomonen that feature is now available for HTML tags: microsoft/vscode#47069. Would be nice to extend it to XML as well.

  2. angelozerr commented on Nov 29, 2019

    @angelozerr
    Contributor

    Thanks @fbricon for this great news! It seems we should support

    • a custom request MatchingTagPositionRequest on LSP4XML (server side)
    • that we should consume on vscode-xml (on client side).

    See commit at microsoft/vscode@0d25d0a

    But pay attention with this feature, it seems that there are some trouble microsoft/vscode#85715

  3. octref commented on Dec 6, 2019

    @octref

    @angelozerr The bugs you pointed are already fixed. To implement this feature for XML, you can support MatchingTagPositionRequest on the server and reference the implementation in our HTML server.

  4. angelozerr commented on Dec 6, 2019

    @angelozerr
    Contributor

    The bugs you pointed are already fixed.

    Thanks for the information!

    To implement this feature for XML, you can support MatchingTagPositionRequest on the server and reference the implementation in our HTML server.

    What do you mean with reference the implementation in our HTML server ?

    @fbricon I think we should really implement this very cool feature.

  5. octref commented on Dec 6, 2019

    @octref

    @angelozerr https://github.com/microsoft/vscode/blob/master/extensions/html-language-features/client/src/mirrorCursor.ts

    There's nothing in LSP that correspond to adding a cursor. So if you want to implement this, the best you can do is to use VS Code's API like the html language client is currently doing.

    Please note that MatchingTagPositionRequest is not an official name.

  6. added this to the 0.10.0 milestone on Dec 10, 2019
  7. added 4 commits that reference this issue on Dec 10, 2019
    339ce59
    2be9253
    4291bb6
    16e72e6
  8. 6 remaining items

  9. added 2 commits that reference this issue on Dec 13, 2019
    9f32fc1
    120b61f
  10. fbricon commented on Dec 18, 2019

    @fbricon
    Collaborator

    Feature doesn't work (see #211 )

  11. removed this from the 0.10.0 milestone on Dec 18, 2019
  12. octref commented on Dec 20, 2019

    @octref

    I can't repro the problem in HTML though. Are you doing anything XML specific?

  13. xorye commented on Dec 20, 2019

    @xorye

    One feature that was specific to vscode-xml was that we added the ability to toggle the xml.mirrorCursorOnMatchingTag feature with Ctrl/Cmd + shift + f2.

    A new listener was added to detect changes to xml.mirrorCursorOnMatchingTag and called the onDidChangeTextEditorSelection() function in order to update the cursor immediately on toggle.

    I'm guessing that we had problems because we didn't have

    if (event.textEditor.document?.languageId !== 'xml' ) {
         return;
    }
    

    in our onDidChangeTextEditorSelection() function.

  14. bmix commented on Mar 10, 2020

    @bmix
    Author
  15. angelozerr commented on Mar 10, 2020

    @angelozerr
    Contributor

    Thanks @bmix for this great information!

  16. angelozerr commented on Apr 22, 2020

    @angelozerr
    Contributor

    @xorye we should manage synced region in LemMinx side and consume it. See HTML Language server commit microsoft/vscode@01e01b1 but I suggest you see for each files the master code (if there are some fixes)

  17. angelozerr commented on Jun 10, 2021

    @angelozerr
    Contributor
  18. added this to the 0.17.0 milestone on Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions