Skip to content

Commit 3697fbd

Browse files
authored
Allow extension yang.settings JSON Schema extensibility (#243)
* Allow extension yang.settings JSON Schema extensibility This addresses #242 Signed-off-by: Siddharth Sharma <[email protected]> * Document multiple extension classpaths Signed-off-by: Siddharth Sharma <[email protected]> --------- Signed-off-by: Siddharth Sharma <[email protected]>
1 parent 5d25b3f commit 3697fbd

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ indent_size = 2
3232
[{*.xtext,*.xtend,*.java}]
3333
indent_style = tab
3434
indent_size = 4
35+
36+
[JenkinsFile]
37+
indent_style = space
38+
indent_size = 4

.vscode/extensions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
// List of extensions which should be recommended for users of this workspace.
5+
"recommendations": [
6+
"editorconfig.editorconfig",
7+
"grammarcraft.xtend-lang",
8+
"grammarcraft.xtext-lang",
9+
"bierner.github-markdown-preview"
10+
],
11+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
12+
"unwantedRecommendations": []
13+
}

docs/Extensions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ project's root directory.
8686
## Add the plugin
8787

8888
Create (or open) the `yang.settings` file and add the plugin using the following
89-
configuration:
89+
configuration. Other classpaths, validator and commands classes can be provided
90+
as well.
9091

9192
```json
9293
"extension" : {
93-
"classpath" : "extension.jar",
94-
"validators" : "my.pack.MyExampleValidator",
95-
"commands" : "my.pack.MyCommand"
94+
"classpath" : "extension.jar:./second-extension.jar:./local-classdir/.",
95+
"validators" : "my.pack.MyExampleValidator:my.pack.MyYetAnotherExampleValidator",
96+
"commands" : "my.pack.MyCommand:my.pack.MyOtherCommand"
9697
}
9798
```
9899

schema/yang-lsp-settings-schema.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,17 @@
3434
"type": "object",
3535
"properties": {
3636
"classpath": {
37-
"description": "Location of extension jar relative to the project's root directory",
38-
"type": "string",
39-
"pattern": "\\.jar$"
37+
"description": "Location of extension jar relative to the project's root directory.\nIt may also be a path to a directory.\nYou can specify multiple elements separated with a colon ':'",
38+
"type": "string"
4039
},
4140
"validators": {
42-
"description": "IValidatorExtension implementor class e.g., 'my.pack.MyExampleValidator'",
43-
"markdownDescription": "`IValidatorExtension` implementor class e.g., `my.pack.MyExampleValidator`",
41+
"description": "IValidatorExtension implementor classes e.g., 'my.pack.MyExampleValidator'.\nYou can specify multiple elements separated with a colon ':'",
42+
"markdownDescription": "`IValidatorExtension` implementor classes e.g., `my.pack.MyExampleValidator`.\nYou can specify multiple elements separated with a colon ':'",
4443
"type": "string"
4544
},
4645
"commands": {
47-
"description": "ICommandExtension implementor class e.g., 'my.pack.MyExampleCommand'",
48-
"markdownDescription": "`ICommandExtension` implementor class e.g., `my.pack.MyExampleCommand`",
46+
"description": "ICommandExtension implementor classes e.g., 'my.pack.MyExampleCommand'.\nYou can specify multiple elements separated with a colon ':'",
47+
"markdownDescription": "`ICommandExtension` implementor class e.g., `my.pack.MyExampleCommand`.\nYou can specify multiple elements separated with a colon ':'",
4948
"type": "string"
5049
}
5150
},
@@ -255,8 +254,7 @@
255254
"$ref": "#/properties/diagnostic/$defs/severity",
256255
"default": "ignore"
257256
}
258-
},
259-
"additionalProperties": false
257+
}
260258
}
261259
},
262260
"additionalProperties": false

0 commit comments

Comments
 (0)