extensions/markdown-language-features/src/extension.ts/registerMarkdownLanguageFeatures
function registerMarkdownLanguageFeatures(
	commandManager: CommandManager,
	symbolProvider: MdDocumentSymbolProvider,
	engine: MarkdownEngine
): vscode.Disposable {
	const selector: vscode.DocumentSelector = { language: 'markdown', scheme: '*' };

	const linkProvider = new MdLinkProvider(engine);
	const workspaceContents = new VsCodeMdWorkspaceContents();

	const referencesProvider = new MdReferencesProvider(linkProvider, workspaceContents, engine, githubSlugifier);
	return vscode.Disposable.from(
		vscode.languages.registerDocumentSymbolProvider(selector, symbolProvider),
		vscode.languages.registerDocumentLinkProvider(selector, linkProvider),
		vscode.languages.registerFoldingRangeProvider(selector, new MdFoldingProvider(engine)),
		vscode.languages.registerSelectionRangeProvider(selector, new MdSmartSelect(engine)),
		vscode.languages.registerWorkspaceSymbolProvider(new MdWorkspaceSymbolProvider(symbolProvider, workspaceContents)),
		vscode.languages.registerReferenceProvider(selector, referencesProvider),
		vscode.languages.registerRenameProvider(selector, new MdRenameProvider(referencesProvider, githubSlugifier)),
		MdPathCompletionProvider.register(selector, engine, linkProvider),
		registerDropIntoEditor(selector),
		registerFindFileReferences(commandManager, referencesProvider),
	);
}