extensions/markdown-language-features/src/languageFeatures/diagnostics.ts/registerDiagnosticSupport
export function registerDiagnosticSupport(
	selector: vscode.DocumentSelector,
	workspace: IMdWorkspace,
	linkProvider: MdLinkProvider,
	commandManager: CommandManager,
	referenceProvider: MdReferencesProvider,
	tocProvider: MdTableOfContentsProvider,
	logger: ILogger,
): vscode.Disposable {
	const configuration = new VSCodeDiagnosticConfiguration();
	const manager = new DiagnosticManager(
		workspace,
		new DiagnosticComputer(workspace, linkProvider, tocProvider),
		configuration,
		new DiagnosticCollectionReporter(),
		referenceProvider,
		tocProvider,
		logger);
	return vscode.Disposable.from(
		configuration,
		manager,
		AddToIgnoreLinksQuickFixProvider.register(selector, commandManager));
}