diff --git a/README.md b/README.md index 1097b3e5..f41d46f4 100644 --- a/README.md +++ b/README.md @@ -107,12 +107,24 @@ To do that: ```json "contributes": { - "xml.javaExtensions": [ - "./jar/your-custom-xml-extension.jar" - ] + "xml.javaExtensions": [ + "./jar/your-custom-xml-extension.jar" + ] } ``` + * You can also list multiple jars or use glob patterns to specify the jars: + +```json +"contributes": { + "xml.javaExtensions": [ + "./jar/dependencies/*.jar", + "./jar/my-xml-extension.jar" + ] +} +``` + + You can see the [vscode-xml-maven](https://github.com/angelozerr/vscode-xml-maven) sample which registers custom maven completion [MavenCompletionParticipant](https://github.com/angelozerr/lsp4xml-extensions-maven/blob/master/org.eclipse.lsp4xml.extensions.maven/src/main/java/org/eclipse/lsp4xml/extensions/maven/MavenCompletionParticipant.java#L28) for scope: ![VScode XML Maven](images/vscode-xml-maven.gif) diff --git a/src/plugin.ts b/src/plugin.ts index 08e3bb7f..d7bdc7b5 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -3,6 +3,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { Commands } from './commands'; +const glob = require('glob'); let existingExtensions: Array; @@ -15,7 +16,7 @@ export function collectXmlJavaExtensions(extensions: readonly vscode.Extension