From 3ac3923e314954451a38a94918552b60ad3a93b3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 08:08:54 -0300 Subject: A Rename the server answers for this file alone, while other open files of its language say the name, is previewed, never applied; Lspwhy shows the files synced first zls renaming at a declaration answers with that file's edits only, cold or warm, whatever it was told of (checked against zls directly: from a call site in main.zig it renames both files, from the declaration in util.zig it never does), so the first Rename applied in util.zig and left main.zig broken. The client now looks for the old name in the other open files of the language; when one says it and the answer left it alone, the edits are a preview with a row naming each such file, and the message row says the server renamed in this file only. Lspwhy carries the open files too, so its trace shows `synced X first` for the query it explains. Co-Authored-By: Claude Opus 5.5 --- src/host_io.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/host_io.zig') diff --git a/src/host_io.zig b/src/host_io.zig index 9e9a37ed..a488f0f8 100644 --- a/src/host_io.zig +++ b/src/host_io.zig @@ -188,7 +188,9 @@ pub const Lsp = struct { }; // ponytail: a copy of every open file per such query; a server // already told of one is sent nothing more (syncDoc). - if (pardes.lsp.reachesOtherFiles(req.kind)) { + // Lspwhy too: the query it explains may be one of those, and its + // trace shows each file synced first. + if (pardes.lsp.reachesOtherFiles(req.kind) or req.kind == .explain) { var others: std.ArrayList(pardes.lsp.Doc) = .empty; errdefer { for (others.items) |doc| { -- cgit v1.3