anchor.diff:      _fileHandlingMethods(peer);
       _diagnosticNotifications(peer);
       _completionMethods(peer);
  +    _referenceMethods(peer);
  +    _codeActionMethods(peer);
   
       peer.listen();
   
  
positive.code:       ..registerMethod('exit', _server.exit);
    }
  
    void _fileHandlingMethods(Peer peer) {
      peer
        ..registerMethod('textDocument/didOpen', (params) async {
          if (!_isInitialized) return;
          var document =
              new TextDocumentItem.fromJson(params['textDocument'].value);
          await _server.textDocumentDidOpen(document);
        })
        ..registerMethod('textDocument/didChange', (params) async {
          if (!_isInitialized) return;
          var documentId = new VersionedTextDocumentIdentifier.fromJson(
              params['textDocument'].value);
          var changes = params['contentChanges'].value.map(
              (change) => new TextDocumentContentChangeEvent.fromJson(change));
          await _server.textDocumentDidChange(documentId, changes);
        })
        ..registerMethod('textDocument/didClose', (params) async {
          if (!_isInitialized) return;
          var documentId =
              new TextDocumentIdentifier(params['textDocument'].value);
          await _server.textDocumentDidClose(documentId);
        });
    }
  
    void _diagnosticNotifications(Peer peer) {
      _server.diagnostics.listen((diagnostics) {
        peer.sendNotification(
            'textDocument/publishDiagnostics', diagnostics.toJson());
      });
    }
  
    void _completionMethods(Peer peer) {
      peer
        ..registerMethod('textDocument/completion', (params) async {
          if (!_isInitialized) {
            throw new RpcException(_notInitialized, _notInitializedMessage);
          }
          var documentId =
              new TextDocumentIdentifier.fromJson(params['textDocument'].value);
          var position = new Position.fromJson(params['position'].value);
          return (await _server.textDocumentCompletion(documentId, position))
              .toJson();
        })
        ..registerMethod('textDocument/definition', (params) async {
          if (!_isInitialized) {
            throw new RpcException(_notInitialized, _notInitializedMessage);
          }
          var documentId =
              new TextDocumentIdentifier.fromJson(params['textDocument'].value);
          var position = new Position.fromJson(params['position'].value);
          return (await _server.textDocumentDefinition(documentId, position))
              ?.toJson();
        })
        ..registerMethod('textDocument/hover', (params) async {
          if (!_isInitialized) {
            throw new RpcException(_notInitialized, _notInitializedMessage);
          }
          var documentId =
              new TextDocumentIdentifier.fromJson(params['textDocument'].value);
          var position = new Position.fromJson(params['position'].value);
          return (await _server.textDocumentHover(documentId, position))
              ?.toJson();
        })
        ..registerMethod('textDocument/references', (params) async {
          if (!_isInitialized) {
            throw new RpcException(_notInitialized, _notInitializedMessage);
          }
          var documentId =
              new TextDocumentIdentifier.fromJson(params['textDocument'].value);
          var position = new Position.fromJson(params['position'].value);
          var context = new ReferenceContext.fromJson(params['context'].value);
          return (await _server.textDocumentReferences(
                  documentId, position, context))
              ?.map((r) => r.toJson())
              ?.toList();
        })
        ..registerMethod('textDocument/codeAction', (params) async {
          if (!_isInitialized) {
            throw new RpcException(_notInitialized, _notInitializedMessage);
          }
          var documentId =
              new TextDocumentIdentifier.fromJson(params['textDocument'].value);
          var range = new Range.fromJson(params['range'].value);
          var context = new CodeActionContext.fromJson(params['context'].value);
          return (await _server.textDocumentCodeAction(
                  documentId, range, context))
              .map((r) => r.toJson())
              ?.toList();
        });
    }
  }
  
negative.code:   }
  
    bool _isInitialized = false;
  
    void _lifecycleMethods(Peer peer) {
      peer
  