summaryrefslogtreecommitdiff
path: root/core/Effect.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Effect.zig')
-rw-r--r--core/Effect.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Effect.zig b/core/Effect.zig
index 3bca04c9..72244f2b 100644
--- a/core/Effect.zig
+++ b/core/Effect.zig
@@ -64,6 +64,10 @@ pub const Effect = union(enum) {
/// `arg` up to 128 bytes, or for `explain` the query it explains,
/// `<kind> <arg>`.
lsp: struct { id: u32, kind: lsp.Kind, pane: Pane.Id, offset: u32, arg: Buf(160) },
+ /// A file opened in pane `pane` (File.open, a session's revived pane):
+ /// the server its language speaks to started and told of it, off the
+ /// loop (dev/Lsp.zig open), so its first query finds it ready.
+ lsp_open: struct { pane: Pane.Id },
/// Snapshot the matching request with pipeRequest(id), then run it away
/// from the UI/event loop and answer with pipe_resp.
pipe: struct { id: u32 },
@@ -216,6 +220,8 @@ fn performInner(p: *Pardes, e: Effect) void {
},
.lsp => |q| p.tape.host(p, .lsp, .{.{ .id = q.id, .kind = q.kind, .pane = q.pane, .offset = q.offset, .arg = q.arg.slice() }}) orelse
p.update(.{ .lsp_resp = .{ .id = q.id, .rows = "" } }),
+ // No workers here (a test, a board): no server starts before a query.
+ .lsp_open => |o| _ = p.tape.host(p, .lsp_open, .{o.pane}),
.pipe => |q| p.tape.host(p, .pipe, .{q.id}) orelse
p.update(.{ .pipe_resp = .{ .id = q.id, .success = false, .outputs = &.{} } }),
// No workers here (a test, a board): it runs on the loop.