Provides an IpcM monad for interacting with an external LSP process. Used for testing the Lean server.
Equations
- Lean.Lsp.Ipc.ipcStdioConfig = { stdin := IO.Process.Stdio.piped, stdout := IO.Process.Stdio.piped, stderr := IO.Process.Stdio.inherit }
Instances For
@[inline, reducible]
Instances For
Equations
- Lean.Lsp.Ipc.stdin = do let __do_lift ← read pure (IO.FS.Stream.ofHandle __do_lift.stdin)
Instances For
Equations
- Lean.Lsp.Ipc.stdout = do let __do_lift ← read pure (IO.FS.Stream.ofHandle __do_lift.stdout)
Instances For
Equations
- Lean.Lsp.Ipc.writeRequest r = do let __do_lift ← Lean.Lsp.Ipc.stdin liftM (IO.FS.Stream.writeLspRequest __do_lift r)
Instances For
def
Lean.Lsp.Ipc.writeNotification
{α : Type u_1}
[Lean.ToJson α]
(n : Lean.JsonRpc.Notification α)
:
Equations
- Lean.Lsp.Ipc.writeNotification n = do let __do_lift ← Lean.Lsp.Ipc.stdin liftM (IO.FS.Stream.writeLspNotification __do_lift n)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.Ipc.readMessage = do let __do_lift ← Lean.Lsp.Ipc.stdout liftM (IO.FS.Stream.readLspMessage __do_lift)
Instances For
Equations
- Lean.Lsp.Ipc.readRequestAs expectedMethod α = do let __do_lift ← Lean.Lsp.Ipc.stdout liftM (IO.FS.Stream.readLspRequestAs __do_lift expectedMethod α)
Instances For
def
Lean.Lsp.Ipc.readResponseAs
(expectedID : Lean.JsonRpc.RequestID)
(α : Type)
[Lean.FromJson α]
:
Equations
- Lean.Lsp.Ipc.readResponseAs expectedID α = do let __do_lift ← Lean.Lsp.Ipc.stdout liftM (IO.FS.Stream.readLspResponseAs __do_lift expectedID α)
Instances For
Equations
- Lean.Lsp.Ipc.waitForExit = do let __do_lift ← read liftM (IO.Process.Child.wait __do_lift)
Instances For
def
Lean.Lsp.Ipc.collectDiagnostics
(waitForDiagnosticsId : optParam Lean.JsonRpc.RequestID 0)
(target : Lean.Lsp.DocumentUri)
(version : Nat)
:
Waits for the worker to emit all diagnostics for the current document version and returns them as a list.
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.Lsp.Ipc.collectDiagnostics.loop
(waitForDiagnosticsId : optParam Lean.JsonRpc.RequestID 0)
:
def
Lean.Lsp.Ipc.runWith
{α : Type}
(lean : Lake.FilePath)
(args : optParam (Array String) #[])
(test : Lean.Lsp.Ipc.IpcM α)
:
IO α
Equations
- One or more equations did not get rendered due to their size.