Skip to content

Extensions for xml-vscode - is any exists? #1069

Closed

Description

@chemodun

I'm interested in the development of some extensions, for some specific xml files.
The reason is simple - the rename provider of this extension is blocking the other ... due to specifics of the realization of this feature in vscode...
That's why I am curious about the real extensions, not only documented possibility ...

Activity

  1. angelozerr commented on Mar 28, 2025

    @angelozerr
    Contributor

    I'm interested in the development of some extensions, for some specific xml files.

    You want to manage custom features for some specific file?

    The reason is simple - the rename provider of this extension is blocking the other ... due to specifics of the realization of this feature in vscode...

    Which problem do you have?

    That's why I am curious about the real extensions, not only documented possibility ...

    Sorry I don't understand what you mean? vscode-xml delegate all XML features (completion, rename, etc) to the XML language server https://github.com/eclipse-lemminx/lemminx written in Java

  2. chemodun commented on Mar 28, 2025

    @chemodun
    Author

    I'm interested in the development of some extensions, for some specific xml files.

    You want to manage custom features for some specific file?

    Yes.
    There is a game - X4 from Egosoft. It has an internal script language based on xml.
    Not asking me about reasons ...

    The reason is simple - the rename provider of this extension is blocking the other ... due to specifics of the realization of this feature in vscode...

    Which problem do you have?

    Modders are using your extension to edit these files, and in common - it is really good.
    But, as it is script language, it uses variables, which are a part of attribute values of some specific xml elements.
    And we made an extension, simple and very basic, which can identify such variables, and using the vscode.languages.registerRenameProvider and some other provider to achieve some basic functionality related to the any variables in most languages extensions.
    Unfortunately, it's working only when this extension is disabled, due to it has, looks like, own RenameProvider.
    And in vscode if "first" rename provider not identified the word is possible to be renamed - other possibilities will not be checked.
    I mean - from other vscode extensions,
    I refer on this vscode issue - microsoft/vscode#115354
    And checked several times our case ...

    That's why I am curious about the real extensions, not only documented possibility ...

    Sorry I don't understand what you mean? vscode-xml delegate all XML features (completion, rename, etc) to the XML language server https://github.com/eclipse-lemminx/lemminx written in Java

    I'm understand, but always better to have some real example of working functionality in addition to documentation,
    And I'm not sure if I will start writing it from scratch ....

  3. angelozerr commented on Mar 28, 2025

    @angelozerr
    Contributor

    I'm interested in the development of some extensions, for some specific xml files.

    You want to manage custom features for some specific file?

    Yes. There is a game - X4 from Egosoft. It has an internal script language based on xml. Not asking me about reasons ...

    The reason is simple - the rename provider of this extension is blocking the other ... due to specifics of the realization of this feature in vscode...

    Which problem do you have?

    Modders are using your extension to edit these files, and in common - it is really good. But, as it is script language, it uses variables, which are a part of attribute values of some specific xml elements. And we made an extension, simple and very basic, which can identify such variables, and using the vscode.languages.registerRenameProvider and some other provider to achieve some basic functionality related to the any variables in most languages extensions. Unfortunately, it's working only when this extension is disabled, due to it has, looks like, own RenameProvider. And in vscode if "first" rename provider not identified the word is possible to be renamed - other possibilities will not be checked. I mean - from other vscode extensions, I refer on this vscode issue - microsoft/vscode#115354 And checked several times our case ...

    That's why I am curious about the real extensions, not only documented possibility ...

    Sorry I don't understand what you mean? vscode-xml delegate all XML features (completion, rename, etc) to the XML language server https://github.com/eclipse-lemminx/lemminx written in Java

    I'm understand, but always better to have some real example of working functionality in addition to documentation, And I'm not sure if I will start writing it from scratch ....

    Ok if I understand correctly your problem, you have a vscode extension which contribute to RenameProvider which works very good without vscode-xml and if you install vscode-xml, your rename provider doesn't work because vscode-xml get the priority to your rename provider.

    First we don't add directly our own rename provider, it is the vscode-languageclient which add this rename provider (see https://github.com/microsoft/vscode-languageserver-node/blob/df05883f34b39255d40d68cef55caf2e93cff35f/client/src/common/client.ts#L1982). I wonder if we could override that here

    workspace: {
    with middleware like vscode-java do that for other feature https://github.com/redhat-developer/vscode-java/blob/405466aff329b43edb0b8e6ccde79e307c2f3fe1/src/extension.ts#L249

    We could try first if the rename (from the XML language server) return a result and if not execute some custom rename provider registered for xml.

    I have no time to investigate, but if you wish to try it, you are welcome!

  4. chemodun commented on Mar 28, 2025

    @chemodun
    Author

    I'm interested in the development of some extensions, for some specific xml files.

    You want to manage custom features for some specific file?

    Yes. There is a game - X4 from Egosoft. It has an internal script language based on xml. Not asking me about reasons ...

    The reason is simple - the rename provider of this extension is blocking the other ... due to specifics of the realization of this feature in vscode...

    Which problem do you have?

    Modders are using your extension to edit these files, and in common - it is really good. But, as it is script language, it uses variables, which are a part of attribute values of some specific xml elements. And we made an extension, simple and very basic, which can identify such variables, and using the vscode.languages.registerRenameProvider and some other provider to achieve some basic functionality related to the any variables in most languages extensions. Unfortunately, it's working only when this extension is disabled, due to it has, looks like, own RenameProvider. And in vscode if "first" rename provider not identified the word is possible to be renamed - other possibilities will not be checked. I mean - from other vscode extensions, I refer on this vscode issue - microsoft/vscode#115354 And checked several times our case ...

    That's why I am curious about the real extensions, not only documented possibility ...

    Sorry I don't understand what you mean? vscode-xml delegate all XML features (completion, rename, etc) to the XML language server https://github.com/eclipse-lemminx/lemminx written in Java

    I'm understand, but always better to have some real example of working functionality in addition to documentation, And I'm not sure if I will start writing it from scratch ....

    Ok if I understand correctly your problem, you have a vscode extension which contribute to RenameProvider which works very good without vscode-xml and if you install vscode-xml, your rename provider doesn't work because vscode-xml get the priority to your rename provider.

    First we don't add directly our own rename provider, it is the vscode-languageclient which add this rename provider (see https://github.com/microsoft/vscode-languageserver-node/blob/df05883f34b39255d40d68cef55caf2e93cff35f/client/src/common/client.ts#L1982). I wonder if we could override that here

    vscode-xml/src/client/xmlClient.ts

    Line 167 in 6c495fa

    workspace: {
    with middleware like vscode-java do that for other feature https://github.com/redhat-developer/vscode-java/blob/405466aff329b43edb0b8e6ccde79e307c2f3fe1/src/extension.ts#L249
    We could try first if the rename (from the XML language server) return a result and if not execute some custom rename provider registered for xml.

    I have no time to investigate, but if you wish to try it, you are welcome!

    Ok.

    Thanks for the ide. will look on it

  5. locked and limited conversation to collaborators on Apr 9, 2025
  6. converted this issue into a discussion #1071 on Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions