in src/ssmLanguageService.ts [247:283]
export function getSsmLanguageService(
workspaceContext: JsonLS.WorkspaceContextService,
contributions: JsonLS.JSONWorkerContribution[],
clientCapabilities: JsonLS.ClientCapabilities
): SsmLanguageService {
const jsonLanguageService = JsonLS.getLanguageService({
workspaceContext,
contributions,
clientCapabilities,
});
const yamlLanguageService = YamlLS.getLanguageService(
() => Promise.reject("SchemaRequestService not provided!"),
workspaceContext,
contributions
);
const schemaConfiguration: JsonLS.SchemaConfiguration = {
fileMatch: ["*"],
uri: "file://schema/ssm-document-schema.json",
schema: ssmDocumentSchema,
};
jsonLanguageService.configure({
validate: true,
allowComments: false,
schemas: [schemaConfiguration],
});
yamlLanguageService.configure({
validate: true,
hover: true,
completion: true,
schemas: [schemaConfiguration],
});
return new SsmLanguageServiceImpl(jsonLanguageService, yamlLanguageService);
}