extensions/markdown-language-features/src/extension.ts/registerMarkdownLanguageFeatures
function registerMarkdownLanguageFeatures(
	parser: IMdParser,
	workspace: IMdWorkspace,
	commandManager: CommandManager,
	tocProvider: MdTableOfContentsProvider,
	logger: ILogger,
): vscode.Disposable {
	const selector: vscode.DocumentSelector = { language: 'markdown', scheme: '*' };

	const linkProvider = new MdLinkProvider(parser, workspace, logger);
	const referencesProvider = new MdReferencesProvider(parser, workspace, tocProvider, logger);
	const symbolProvider = new MdDocumentSymbolProvider(tocProvider, logger);

	return vscode.Disposable.from(
		linkProvider,
		referencesProvider,

		// Language features
		registerDefinitionSupport(selector, referencesProvider),
		registerDiagnosticSupport(selector, workspace, linkProvider, commandManager, referencesProvider, tocProvider, logger),
		registerDocumentLinkSupport(selector, linkProvider),
		registerDocumentSymbolSupport(selector, tocProvider, logger),
		registerDropIntoEditorSupport(selector),
		registerFindFileReferenceSupport(commandManager, referencesProvider),
		registerFoldingSupport(selector, parser, tocProvider),
		registerPasteSupport(selector),
		registerPathCompletionSupport(selector, workspace, parser, linkProvider),
		registerReferencesSupport(selector, referencesProvider),
		registerRenameSupport(selector, workspace, referencesProvider, parser.slugifier),
		registerSmartSelectSupport(selector, parser, tocProvider),
		registerWorkspaceSymbolSupport(workspace, symbolProvider),
	);
}