@@ -218,17 +218,21 @@ connection.onDidChangeConfiguration((change) => {
218
218
configureHttpRequests ( settings . http && settings . http . proxy , settings . http && settings . http . proxyStrictSSL ) ;
219
219
220
220
specificValidatorPaths = [ ] ;
221
- yamlConfigurationSettings = settings . yaml && settings . yaml . schemas ;
222
- yamlShouldValidate = settings . yaml && settings . yaml . validate ;
223
- yamlShouldHover = settings . yaml && settings . yaml . hover ;
224
- yamlShouldCompletion = settings . yaml && settings . yaml . completion ;
221
+ if ( settings . yaml ) {
222
+ yamlConfigurationSettings = settings . yaml . schemas ;
223
+ yamlShouldValidate = settings . yaml . validate ;
224
+ yamlShouldHover = settings . yaml . hover ;
225
+ yamlShouldCompletion = settings . yaml . completion ;
226
+ customTags = settings . yaml . customTags ? settings . yaml . customTags : [ ] ;
227
+ yamlFormatterSettings = {
228
+ singleQuote : settings . yaml . format . singleQuote || false ,
229
+ proseWrap : settings . yaml . format . proseWrap || "preserve"
230
+ } ;
231
+ if ( settings . yaml . format . bracketSpacing === false ) {
232
+ yamlFormatterSettings . bracketSpacing = false ;
233
+ }
234
+ }
225
235
schemaConfigurationSettings = [ ] ;
226
- customTags = settings . yaml && settings . yaml . customTags ? settings . yaml . customTags : [ ] ;
227
- yamlFormatterSettings = settings . yaml && {
228
- singleQuote : settings . yaml . format . singleQuote || false ,
229
- bracketSpacing : settings . yaml . format . bracketSpacing || true ,
230
- proseWrap : settings . yaml . format . proseWrap || "preserve"
231
- } ;
232
236
233
237
for ( let url in yamlConfigurationSettings ) {
234
238
let globPattern = yamlConfigurationSettings [ url ] ;
0 commit comments