Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 2.9 KB

File metadata and controls

48 lines (34 loc) · 2.9 KB

Extensions

Custom XML Extensions

The LemMinX - XML Language Server can be extended to support custom completion, hover, validation, rename, etc by using the Java Service Provider Interface (SPI) mechanism. vscode-xml provides the ability to use your custom XML support provider, by adding external jars to the XML language server's classpath.

To do that:

"contributes": {
  "xml.javaExtensions": [
    "./jar/your-custom-xml-extension.jar"
  ]
}
  • You can also list multiple jars or use glob patterns to specify the jars:
"contributes": {
  "xml.javaExtensions": [
    "./jar/dependencies/*.jar",
    "./jar/my-xml-extension.jar"
  ]
}

You can see the vscode-xml-maven sample which registers custom maven completion MavenCompletionParticipant for scope:

demo of vscode xml maven suggesting different scopes for a dependency

XML extension API (TypeScript)

See PR 292

Commands

xml.workspace.executeCommand - command registered on VSCode client (via vscode-xml extension) to let other extensions execute commands on XML Language server

xml/executeClientCommand - XML Language server LSP extension to let XML LS extenders execute commands on the client. The command is made available via IXMLCommandService on the server side. See XML LS extensions docs