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: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
#### 0.2.1
2
+
3
+
- Added fix for language server crashing when settings.yaml.format was not sent [#111](https://github.com/redhat-developer/yaml-language-server/issues/111)
4
+
1
5
#### 0.2.0
2
6
3
7
- Added fix for bracket spacing option in formatter [#Commit](https://github.com/redhat-developer/yaml-language-server/commit/3b79ef397dbd215744c4577da9227298b3447bad)
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,39 @@ The following settings are supported:
36
36
*`yaml.hover`: Enable/disable hover
37
37
*`yaml.completion`: Enable/disable autocompletion
38
38
*`yaml.schemas`: Helps you associate schemas with files in a glob pattern
39
-
*`yaml.customTags`: Array of custom tags that the parser will validate against. It has two ways to be used. Either an item in the array is a custom tag such as "!Ref" or you can specify the type of the object !Ref should be by doing "!Ref Scalar". For example: ["!Ref", "!Some-Tag Scalar"]. The type of object can be one of Scalar, Sequence, Mapping, Map.
40
39
*`yaml.schemaStore.enable`: When set to true the YAML language server will pull in all available schemas from [JSON Schema Store](http://schemastore.org/json/)
40
+
*`yaml.customTags`: Array of custom tags that the parser will validate against. It has two ways to be used. Either an item in the array is a custom tag such as "!Ref" and it will automatically map !Ref to scalar or you can specify the type of the object !Ref should be e.g. "!Ref sequence". The type of object can be either scalar (for strings and booleans), sequence (for arrays), map (for objects).
41
41
*`[yaml]`: VSCode-YAML adds default configuration for all yaml files. More specifically it converts tabs to spaces to ensure valid yaml, sets the tab size, and allows live typing autocompletion. These settings can be modified via the corresponding settings inside the `[yaml]` section in the settings:
42
42
*`editor.insertSpaces`
43
43
*`editor.tabSize`
44
44
*`editor.quickSuggestions`
45
45
46
+
##### Adding custom tags
47
+
48
+
In order to use the custom tags in your YAML file you need to first specify the custom tags in the setting of your code editor. For example, you can have the following custom tags:
49
+
50
+
```YAML
51
+
"yaml.customTags": [
52
+
"!Scalar-example scalar",
53
+
"!Seq-example sequence",
54
+
"!Mapping-example mapping"
55
+
]
56
+
```
57
+
58
+
The !Scalar-example would map to a scalar custom tag, the !Seq-example would map to a sequence custom tag, the !Mapping-example would map to a mapping custom tag.
59
+
60
+
You can then use the newly defined custom tags inside the YAML file:
61
+
62
+
```YAML
63
+
some_key: !Scalar-example some_value
64
+
some_sequence: !Seq-example
65
+
- some_seq_key_1: some_seq_value_1
66
+
- some_seq_key_2: some_seq_value_2
67
+
some_mapping: !Mapping-example
68
+
some_mapping_key_1: some_mapping_value_1
69
+
some_mapping_key_2: some_mapping_value_2
70
+
```
71
+
46
72
##### Associating a schema to a glob pattern via yaml.schemas:
47
73
yaml.schemas applies a schema to a file. In other words, the schema (placed on the left) is applied to the glob pattern on the right. Your schema can be local or online. Your schema must be a relative path and not an absolute path.
0 commit comments