class Spoom::LSP::Client

def read

def read
  json = JSON.parse(read_raw)
  # Handle error in the LSP protocol
  raise ResponseError.from_json(json['error']) if json['error']
  # Handle typechecking errors
  raise Error::Diagnostics.from_json(json['params']) if json['method'] == "textDocument/publishDiagnostics"
  json
end