summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 88045147..e65e48eb 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -6623,6 +6623,7 @@ pub const Pardes = struct {
.subtypes => "Subtypes",
.rename => "Rename",
.format => "Format",
+ .index => "Index",
else => @tagName(kind),
};
}
@@ -6661,6 +6662,12 @@ pub const Pardes = struct {
const why = std.mem.trimEnd(u8, rows["@none ".len..], "\n");
return p.reportFailure(w.pane, std.fmt.bufPrint(&said, "{s}: {s}", .{ lspWord(w.kind), why[0..@min(why.len, 200)] }) catch "no answer");
}
+ // Index's answer is its indexer's command line, run in a command
+ // pane (lsp_client.indexCommand).
+ if (w.kind == .index) {
+ if (std.mem.startsWith(u8, rows, "@run ")) _ = exec.execute(p, w.pane, std.mem.trimEnd(u8, rows["@run ".len..], "\n"));
+ return;
+ }
if (w.kind == .rename or w.kind == .format) {
const fallback: ?[]const u8 = if (w.kind == .rename) w.arg.slice() else null;
if (p.parseLspEdits(rows, fallback)) |edits| {