|
28 | 28 | "Formatters" |
29 | 29 | ], |
30 | 30 | "activationEvents": [ |
31 | | - "onStartupFinished" |
| 31 | + "onLanguage:yaml", |
| 32 | + "onCommand:vscode-yaml-sort.customSortYaml_1", |
| 33 | + "onCommand:vscode-yaml-sort.customSortYaml_2", |
| 34 | + "onCommand:vscode-yaml-sort.customSortYaml_3", |
| 35 | + "onCommand:vscode-yaml-sort.formatYaml", |
| 36 | + "onCommand:vscode-yaml-sort.sortYaml", |
| 37 | + "onCommand:vscode-yaml-sort.sortYamlFilesInDirectory", |
| 38 | + "onCommand:vscode-yaml-sort.validateYaml" |
32 | 39 | ], |
33 | 40 | "main": "./out/extension.js", |
34 | 41 | "contributes": { |
|
51 | 58 | "properties": { |
52 | 59 | "vscode-yaml-sort.emptyLinesUntilLevel": { |
53 | 60 | "type": "number", |
| 61 | + "scope": "language-overridable", |
54 | 62 | "default": 0, |
55 | 63 | "description": "When bigger than 0, will add a new line before each keyword on level n." |
56 | 64 | }, |
57 | 65 | "vscode-yaml-sort.customSortKeywords_1": { |
58 | 66 | "type": "array", |
| 67 | + "scope": "language-overridable", |
59 | 68 | "items": { |
60 | 69 | "type": "string" |
61 | 70 | }, |
|
70 | 79 | }, |
71 | 80 | "vscode-yaml-sort.customSortKeywords_2": { |
72 | 81 | "type": "array", |
| 82 | + "scope": "language-overridable", |
73 | 83 | "items": { |
74 | 84 | "type": "string" |
75 | 85 | }, |
|
78 | 88 | }, |
79 | 89 | "vscode-yaml-sort.customSortKeywords_3": { |
80 | 90 | "type": "array", |
| 91 | + "scope": "language-overridable", |
81 | 92 | "items": { |
82 | 93 | "type": "string" |
83 | 94 | }, |
|
86 | 97 | }, |
87 | 98 | "vscode-yaml-sort.extensions": { |
88 | 99 | "type": "array", |
| 100 | + "scope": "resource", |
89 | 101 | "items": { |
90 | 102 | "type": "string" |
91 | 103 | }, |
|
97 | 109 | }, |
98 | 110 | "vscode-yaml-sort.forceQuotes": { |
99 | 111 | "type": "boolean", |
| 112 | + "scope": "language-overridable", |
100 | 113 | "default": false, |
101 | 114 | "description": "When true, all non-key strings will be quoted even if they normally don't need to." |
102 | 115 | }, |
103 | 116 | "vscode-yaml-sort.indent": { |
104 | 117 | "type": "integer", |
| 118 | + "scope": "language-overridable", |
105 | 119 | "default": 2, |
106 | 120 | "description": "Indentation width in spaces." |
107 | 121 | }, |
108 | 122 | "vscode-yaml-sort.lineWidth": { |
109 | 123 | "type": "integer", |
| 124 | + "scope": "language-overridable", |
110 | 125 | "default": 500, |
111 | 126 | "description": "Maximum line width for YAML files." |
112 | 127 | }, |
113 | 128 | "vscode-yaml-sort.locale": { |
114 | 129 | "type": "string", |
| 130 | + "scope": "language-overridable", |
115 | 131 | "default": "en", |
116 | 132 | "description": "Language whose sort order should be used." |
117 | 133 | }, |
118 | 134 | "vscode-yaml-sort.nullStyle": { |
119 | 135 | "type": "string", |
| 136 | + "scope": "language-overridable", |
120 | 137 | "default": "lowercase", |
121 | 138 | "enum": [ |
122 | 139 | "lowercase", |
|
136 | 153 | }, |
137 | 154 | "vscode-yaml-sort.noArrayIndent": { |
138 | 155 | "type": "boolean", |
| 156 | + "scope": "language-overridable", |
139 | 157 | "default": false, |
140 | 158 | "description": "When true, will not add an indentation level to array elements." |
141 | 159 | }, |
142 | 160 | "vscode-yaml-sort.noCompatMode": { |
143 | 161 | "type": "boolean", |
| 162 | + "scope": "language-overridable", |
144 | 163 | "default": false, |
145 | 164 | "description": "When true, don't try to be compatible with older yaml versions. Currently: don't quote 'yes', 'no' and so on, as required for YAML 1.1" |
146 | 165 | }, |
|
151 | 170 | }, |
152 | 171 | "vscode-yaml-sort.quotingType": { |
153 | 172 | "type": "string", |
| 173 | + "scope": "language-overridable", |
154 | 174 | "default": "'", |
155 | 175 | "enum": [ |
156 | 176 | "'", |
|
160 | 180 | }, |
161 | 181 | "vscode-yaml-sort.schema": { |
162 | 182 | "type": "string", |
| 183 | + "scope": "language-overridable", |
163 | 184 | "default": "DEFAULT_SCHEMA", |
164 | 185 | "enum": [ |
165 | 186 | "HOMEASSISTANT_SCHEMA", |
|
173 | 194 | }, |
174 | 195 | "vscode-yaml-sort.sortArrays": { |
175 | 196 | "type": "boolean", |
| 197 | + "scope": "language-overridable", |
176 | 198 | "default": false, |
177 | 199 | "description": "When `true`, will sort arrays" |
178 | 200 | }, |
179 | 201 | "vscode-yaml-sort.sortOrderReverse": { |
180 | 202 | "type": "boolean", |
| 203 | + "scope": "language-overridable", |
181 | 204 | "default": false, |
182 | 205 | "description": "When `true`, will sort in reverse order" |
183 | 206 | }, |
184 | 207 | "vscode-yaml-sort.sortOnSave": { |
185 | 208 | "type": "number", |
| 209 | + "scope": "language-overridable", |
186 | 210 | "default": 0, |
187 | 211 | "description": "When `0`, will sort files when saving. When `1`, `2` or `3`, will use customSortKeywords. Set to negative value to disable sortOnSave." |
188 | 212 | }, |
189 | 213 | "vscode-yaml-sort.useCustomSortRecursively": { |
190 | 214 | "type": "boolean", |
| 215 | + "scope": "language-overridable", |
191 | 216 | "default": false, |
192 | 217 | "description": "When true, will use the custom sort keywords recursively on a file, when using custom sort" |
193 | 218 | }, |
194 | 219 | "vscode-yaml-sort.useLeadingDashes": { |
195 | 220 | "type": "boolean", |
| 221 | + "scope": "language-overridable", |
196 | 222 | "default": true, |
197 | 223 | "description": "Define if sorted YAML files should begin with leading dashes." |
198 | 224 | }, |
199 | 225 | "vscode-yaml-sort.useArrayProcessor": { |
200 | 226 | "type": "boolean", |
| 227 | + "scope": "language-overridable", |
201 | 228 | "default": true, |
202 | 229 | "description": "When `true`, will activate ArrayProcessor" |
203 | 230 | }, |
204 | 231 | "vscode-yaml-sort.useBlockProcessor": { |
205 | 232 | "type": "boolean", |
| 233 | + "scope": "language-overridable", |
206 | 234 | "default": true, |
207 | 235 | "description": "When `true`, will activate BlockProcessor" |
208 | 236 | }, |
209 | 237 | "vscode-yaml-sort.useCommentProcessor": { |
210 | 238 | "type": "boolean", |
| 239 | + "scope": "language-overridable", |
211 | 240 | "default": true, |
212 | 241 | "description": "When `true`, will activate CommentProcessor" |
213 | 242 | }, |
214 | 243 | "vscode-yaml-sort.useHelmProcessor": { |
215 | 244 | "type": "boolean", |
| 245 | + "scope": "language-overridable", |
216 | 246 | "default": true, |
217 | 247 | "description": "When `true`, will activate HelmProcessor" |
218 | 248 | }, |
219 | 249 | "vscode-yaml-sort.useOctalProcessor": { |
220 | 250 | "type": "boolean", |
| 251 | + "scope": "language-overridable", |
221 | 252 | "default": true, |
222 | 253 | "description": "When `true`, will activate OctalProcessor" |
223 | 254 | } |
|
226 | 257 | "commands": [ |
227 | 258 | { |
228 | 259 | "command": "vscode-yaml-sort.customSortYaml_1", |
229 | | - "title": "YAML Sort: Custom sort 1", |
230 | | - "when": "editorLangId == yaml" |
| 260 | + "title": "YAML Sort: Custom sort 1" |
231 | 261 | }, |
232 | 262 | { |
233 | 263 | "command": "vscode-yaml-sort.customSortYaml_2", |
234 | | - "title": "YAML Sort: Custom sort 2", |
235 | | - "when": "editorLangId == yaml" |
| 264 | + "title": "YAML Sort: Custom sort 2" |
236 | 265 | }, |
237 | 266 | { |
238 | 267 | "command": "vscode-yaml-sort.customSortYaml_3", |
239 | | - "title": "YAML Sort: Custom sort 3", |
240 | | - "when": "editorLangId == yaml" |
| 268 | + "title": "YAML Sort: Custom sort 3" |
241 | 269 | }, |
242 | 270 | { |
243 | 271 | "command": "vscode-yaml-sort.formatYaml", |
244 | | - "title": "YAML Sort: Format YAML", |
245 | | - "when": "editorLangId == yaml" |
| 272 | + "title": "YAML Sort: Format YAML" |
246 | 273 | }, |
247 | 274 | { |
248 | 275 | "command": "vscode-yaml-sort.sortYaml", |
249 | | - "title": "YAML Sort: Sort YAML", |
250 | | - "when": "editorLangId == yaml" |
| 276 | + "title": "YAML Sort: Sort YAML" |
251 | 277 | }, |
252 | 278 | { |
253 | 279 | "command": "vscode-yaml-sort.sortYamlFilesInDirectory", |
254 | 280 | "title": "YAML Sort: Recursively sort YAML files" |
255 | 281 | }, |
256 | 282 | { |
257 | 283 | "command": "vscode-yaml-sort.validateYaml", |
258 | | - "title": "YAML Sort: Validate YAML", |
259 | | - "when": "editorLangId == yaml" |
| 284 | + "title": "YAML Sort: Validate YAML" |
260 | 285 | } |
261 | 286 | ], |
262 | 287 | "menus": { |
263 | 288 | "commandPalette": [ |
264 | 289 | { |
265 | 290 | "command": "vscode-yaml-sort.sortYamlFilesInDirectory", |
266 | 291 | "when": "false" |
| 292 | + }, |
| 293 | + { |
| 294 | + "command": "vscode-yaml-sort.customSortYaml_1", |
| 295 | + "when": "editorLangId == yaml" |
| 296 | + }, |
| 297 | + { |
| 298 | + "command": "vscode-yaml-sort.customSortYaml_2", |
| 299 | + "when": "editorLangId == yaml" |
| 300 | + }, |
| 301 | + { |
| 302 | + "command": "vscode-yaml-sort.customSortYaml_3", |
| 303 | + "when": "editorLangId == yaml" |
| 304 | + }, |
| 305 | + { |
| 306 | + "command": "vscode-yaml-sort.formatYaml", |
| 307 | + "when": "editorLangId == yaml" |
| 308 | + }, |
| 309 | + { |
| 310 | + "command": "vscode-yaml-sort.sortYaml", |
| 311 | + "when": "editorLangId == yaml" |
| 312 | + }, |
| 313 | + { |
| 314 | + "command": "vscode-yaml-sort.validateYaml", |
| 315 | + "when": "editorLangId == yaml" |
267 | 316 | } |
268 | 317 | ], |
269 | 318 | "explorer/context": [ |
|
0 commit comments