private async Task InitializeAsync(Stream input, Stream output) { _server = await OmniSharp.Extensions.LanguageServer.Server.LanguageServer.From(options => options .WithInput(input) .WithOutput(output) .WithLoggerFactory(_loggerFactory) .OnInitialized(OnInitialized)); var diagnosticService = _workspace.Services.GetService <IDiagnosticService>(); _diagnosticNotifier = new DiagnosticNotifier(_server, diagnosticService); var documentSelector = new DocumentSelector( LanguageNames.AllLanguages .Select(x => new DocumentFilter { Language = x.ToLowerInvariant() })); var registrationOptions = new TextDocumentRegistrationOptions { DocumentSelector = documentSelector }; _server.AddHandlers( new TextDocumentSyncHandler(_workspace, registrationOptions), new CompletionHandler(_workspace, registrationOptions), new DefinitionHandler(_workspace, registrationOptions), new WorkspaceSymbolsHandler(_workspace), new DocumentHighlightHandler(_workspace, registrationOptions), new DocumentSymbolsHandler(_workspace, registrationOptions), new HoverHandler(_workspace, registrationOptions), new SignatureHelpHandler(_workspace, registrationOptions)); }