summaryrefslogtreecommitdiff
path: root/src/lsp/lsp.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/lsp/lsp.zig')
-rw-r--r--src/lsp/lsp.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lsp/lsp.zig b/src/lsp/lsp.zig
index 1263b583..88d9cda2 100644
--- a/src/lsp/lsp.zig
+++ b/src/lsp/lsp.zig
@@ -105,14 +105,14 @@ pub fn speaks(path: []const u8) bool {
return has_client and client.speaks(path);
}
-pub fn query(io: std.Io, gpa: std.mem.Allocator, arena: std.mem.Allocator, req: Req, out: *std.Io.Writer) !void {
+pub fn query(io: std.Io, arena: std.mem.Allocator, req: Req, out: *std.Io.Writer) !void {
if (req.kind == .status) {
try out.print("backend: {s}\n", .{backend_name});
- if (has_client) try client.query(io, gpa, arena, req, out);
+ if (has_client) try client.query(io, arena, req, out);
return;
}
if (has_client and (req.kind == .explain or (client.speaks(req.path) and client.supports.contains(req.kind))))
- return client.query(io, gpa, arena, req, out);
+ return client.query(io, arena, req, out);
// Nothing asked: said why, where an empty answer would read as nothing
// found.
if (speaks(req.path))
@@ -216,6 +216,6 @@ test "a question no backend answers for a file says why rather than find nothing
var buf: [256]u8 = undefined;
var out: std.Io.Writer = .fixed(&buf);
// A file no server speaks for is answered, not left empty.
- try query(std.testing.io, std.testing.allocator, arena.allocator(), .{ .kind = .incoming_calls, .path = "/x/notes.txt", .source = "", .offset = 0 }, &out);
+ try query(std.testing.io, arena.allocator(), .{ .kind = .incoming_calls, .path = "/x/notes.txt", .source = "", .offset = 0 }, &out);
try std.testing.expectStringStartsWith(out.buffered(), "@none ");
}