From 69e809f64a30b09d9bd5ab56a3a80e94fc3f99c3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 19:36:52 -0300 Subject: split pardes.zig by noun, lsp/Ask: the core's side of a question to the language servers moves into src/lsp/Ask.zig: lspRequest, lspResponse and what an answer does (LspEdit, parseLspEdits, decodePct, mapLspEditOffset, applyLspEdits, lspWord); the session keeps p.lspRequest as a declaration alias (every language word, macOS and the tests call it), lsp.zig names the file (pardes.lsp.Ask, for test/output.zig), and the 9P tests in ninep/ctl.zig call Ask.lspResponse; the wait's fields stay the session's until #38; tests moved with them, by name: Lspwhy after a Hover asks to explain that hover, in its file at its place, run from any pane; Def and Refs are a speaking file's tag words; gd, gr and a 2-1 chord all run them; Callstack always opens and focuses its own pane, reusing it for another symbol; Callers with one answer jumps to it and says where, in a msg; a Rename the language server finds nothing for says so, and changes nothing; LSP failure clears only its matching wait without completion indentation; a pure move, no field touched, a dump and the wire as they were; gates: tui core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), gui unit-test 1518/1519 (1 skipped) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/output.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/output.zig') diff --git a/test/output.zig b/test/output.zig index c72668b4..0711442c 100644 --- a/test/output.zig +++ b/test/output.zig @@ -202,7 +202,7 @@ test "references fill the asking text's query pane: sorted under their files, th const request = p.lsp_wait.?.id; // the cursor moves before the answer: it is placed by where it was asked source.body.cur_row = 4; - p.lspResponse(request, response); + pardes.lsp.Ask.lspResponse(p, request, response); const qid = panes.Query.ofOwner(p, source.serial) orelse return error.MissingResults; const results = p.panes[qid].?; const content = results.file.?.content; @@ -272,7 +272,7 @@ test "a single language location opens the full spaced filename" { const p = try Pardes.init(std.testing.allocator, .{ .file = path }); defer p.deinit(); p.lspRequest(0, .references, ""); - p.lspResponse(p.lsp_wait.?.id, "with space.zig:2:1 second\n"); + pardes.lsp.Ask.lspResponse(p, p.lsp_wait.?.id, "with space.zig:2:1 second\n"); try std.testing.expect(std.mem.endsWith(u8, p.panes[p.active].?.file.?.path, "/with space.zig")); try std.testing.expectEqual(@as(i32, 1), p.panes[p.active].?.body.cur_row); for (p.panes) |slot| { -- cgit v1.3