Skip to content

Commit 36652cb

Browse files
author
Loïc Mangeonjean
committed
feat: add jsonSchema schema
1 parent 1480e14 commit 36652cb

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/features/jsonContribution.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@ function updateDiagnosticsOptions () {
77
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
88
comments: 'ignore',
99
validate: true,
10-
schemas: getJsonSchemas({
11-
keybindings: ['file:///keybindings.json'],
12-
'settings/user': ['file:///settings.json']
13-
})
10+
enableSchemaRequest: true,
11+
schemas: [
12+
...getJsonSchemas({
13+
keybindings: ['file:///keybindings.json'],
14+
'settings/user': ['file:///settings.json']
15+
})!,
16+
{
17+
uri: 'https://json-schema.org/draft/2019-09/schema',
18+
fileMatch: ['*.schema.json']
19+
}
20+
]
1421
})
1522
}
1623

0 commit comments

Comments
 (0)