public async Task <IDocumentOptions> GetOptionsForDocumentAsync(Document document, CancellationToken cancellationToken) { var mimeChain = DesktopService.GetMimeTypeInheritanceChainForRoslynLanguage(document.Project.Language); if (mimeChain == null) { return(null); } var project = TypeSystemService.GetMonoProject(document.Project); var policy = project.Policies.Get <TextStylePolicy> (mimeChain); return(new TextDocumentOptions(policy)); }