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 }
Equations
- Lean.Lsp.Ipc.stdin = do let __do_lift ← read pure (IO.FS.Stream.ofHandle __do_lift.stdin)
Equations
- Lean.Lsp.Ipc.stdout = do let __do_lift ← read pure (IO.FS.Stream.ofHandle __do_lift.stdout)
Equations
- Lean.Lsp.Ipc.writeRequest r = do let __do_lift ← Lean.Lsp.Ipc.stdin liftM (__do_lift.writeLspRequest r)
Equations
- Lean.Lsp.Ipc.writeNotification n = do let __do_lift ← Lean.Lsp.Ipc.stdin liftM (__do_lift.writeLspNotification n)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Lsp.Ipc.readMessage = do let __do_lift ← Lean.Lsp.Ipc.stdout liftM __do_lift.readLspMessage
Equations
- Lean.Lsp.Ipc.readRequestAs expectedMethod α = do let __do_lift ← Lean.Lsp.Ipc.stdout liftM (__do_lift.readLspRequestAs expectedMethod α)
Reads response, discarding notifications and server-to-client requests in between.
This function is meant purely for testing where we use collectDiagnostics
explicitly
if we do care about such notifications.
Equations
- Lean.Lsp.Ipc.waitForExit = do let __do_lift ← read liftM __do_lift.wait
Waits for the worker to emit all diagnostic notifications for the current document version and returns the last notification, if any.
We used to return all notifications but with debouncing in the server, this would not be deterministic anymore as what messages are dropped depends on wall-clock timing.
Equations
- One or more equations did not get rendered due to their size.
Waits for a diagnostic notification with a specific message to be emitted. Discards all received
messages, so should not be combined with collectDiagnostics
.
Equations
Equations
- One or more equations did not get rendered due to their size.