mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 17:38:19 +08:00
22 lines
568 B
TypeScript
22 lines
568 B
TypeScript
import { setDiagnosticsOptions } from 'monaco-yaml';
|
|
import problemConfigSchema from '../schema/problemconfig';
|
|
|
|
setDiagnosticsOptions({
|
|
validate: true,
|
|
enableSchemaRequest: true,
|
|
hover: true,
|
|
completion: true,
|
|
format: false,
|
|
schemas: [
|
|
{
|
|
uri: 'https://hydro.js.org/schema/problemConfig.json',
|
|
fileMatch: ['hydro://problem/file/config.yaml'],
|
|
schema: problemConfigSchema,
|
|
},
|
|
{
|
|
uri: new URL('/manage/config/schema.json', window.location.href).toString(),
|
|
fileMatch: ['hydro://system/setting.yaml'],
|
|
},
|
|
],
|
|
});
|