You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Extensions.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,36 @@
1
1
# Extensions
2
2
3
-
## Custom XML Extensions
3
+
## Contribution in package.json
4
+
5
+
### Custom language
6
+
7
+
If your vscode extension defines a custom language `myxml` in package.json:
8
+
9
+
```json
10
+
"contributes": {
11
+
"languages": [
12
+
{
13
+
"id": "myxml",
14
+
"extensions": [
15
+
".myxml"
16
+
]
17
+
}
18
+
]
19
+
```
20
+
21
+
and you want that `myxml` language uses [vscode-xml](https://github.com/redhat-developer/vscode-xml) language server, you need to declare it with `xmlLanguageParticipants`:
22
+
23
+
```json
24
+
"contributes": {
25
+
"xmlLanguageParticipants": [
26
+
{
27
+
"languageId": "myxml"
28
+
}
29
+
]
30
+
}
31
+
```
32
+
33
+
## Custom XML Extensions (written in Java)
4
34
5
35
The [LemMinX - XML Language Server](https://github.com/eclipse/lemminx) can be extended to support custom completion, hover, validation, rename, etc by using the [Java Service Provider Interface (SPI)](https://www.baeldung.com/java-spi) mechanism.
6
36
vscode-xml provides the ability to use your custom XML support provider, by adding external jars to the XML language server's classpath.
0 commit comments