Reading/writing LSP messages from/to IO handles.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
IO.FS.Stream.readLspRequestAs
(h : IO.FS.Stream)
(expectedMethod : String)
(α : Type)
[Lean.FromJson α]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
IO.FS.Stream.readLspNotificationAs
(h : IO.FS.Stream)
(expectedMethod : String)
(α : Type)
[Lean.FromJson α]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
IO.FS.Stream.readLspResponseAs
(h : IO.FS.Stream)
(expectedID : Lean.JsonRpc.RequestID)
(α : Type)
[Lean.FromJson α]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
IO.FS.Stream.writeLspRequest
{α : Type u_1}
[Lean.ToJson α]
(h : IO.FS.Stream)
(r : Lean.JsonRpc.Request α)
:
Equations
- h.writeLspRequest r = h.writeLspMessage (Lean.JsonRpc.Message.request r.id r.method (Lean.Json.toStructured? r.param).toOption)
Instances For
def
IO.FS.Stream.writeLspNotification
{α : Type u_1}
[Lean.ToJson α]
(h : IO.FS.Stream)
(n : Lean.JsonRpc.Notification α)
:
Equations
- h.writeLspNotification n = h.writeLspMessage (Lean.JsonRpc.Message.notification n.method (Lean.Json.toStructured? n.param).toOption)
Instances For
def
IO.FS.Stream.writeLspResponse
{α : Type u_1}
[Lean.ToJson α]
(h : IO.FS.Stream)
(r : Lean.JsonRpc.Response α)
:
Equations
- h.writeLspResponse r = h.writeLspMessage (Lean.JsonRpc.Message.response r.id (Lean.toJson r.result))
Instances For
Equations
- h.writeLspResponseError e = h.writeLspMessage (Lean.JsonRpc.Message.responseError e.id e.code e.message none)
Instances For
def
IO.FS.Stream.writeLspResponseErrorWithData
{α : Type u_1}
[Lean.ToJson α]
(h : IO.FS.Stream)
(e : Lean.JsonRpc.ResponseError α)
:
Equations
- h.writeLspResponseErrorWithData e = h.writeLspMessage (Lean.JsonRpc.Message.responseError e.id e.code e.message (Option.map Lean.toJson e.data?))