monaco jsonDefaults 保留原有配置

This commit is contained in:
2betop 2020-10-10 14:42:56 +08:00
parent b897efe4f2
commit 09796d31d6

View File

@ -216,7 +216,8 @@ export class Editor extends React.Component<EditorProps, any> {
monaco.languages.json?.jsonDefaults.setDiagnosticsOptions({
enableSchemaRequest: true,
validate: true,
allowComments: true
allowComments: true,
...monaco.languages.json?.jsonDefaults.diagnosticsOptions
});
// After initializing monaco editor