diff options
Diffstat (limited to 'src/lsp/lsp_client.zig')
| -rw-r--r-- | src/lsp/lsp_client.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lsp/lsp_client.zig b/src/lsp/lsp_client.zig index c3762f08..55df1f91 100644 --- a/src/lsp/lsp_client.zig +++ b/src/lsp/lsp_client.zig @@ -408,6 +408,7 @@ pub fn query(gpa: std.mem.Allocator, arena: std.mem.Allocator, req: lsp.Req, out tr.note("STOP: no language server spec matches {s}", .{ if (req.path.len == 0) "a pane with no file" else req.path, }); + if (req.kind != .explain) return lsp.none(out, "no language server for {s}", .{if (req.path.len == 0) "a pane with no file" else std.fs.path.basename(req.path)}); return traceOut(&tr, req, out, 0, 0); }; tr.note("file {s} -> {s} (languageId {s})", .{ std.fs.path.basename(req.path), specs[si].name, specs[si].lang }); @@ -807,11 +808,11 @@ fn hierarchy(c: *Conn, si: usize, arena: std.mem.Allocator, cx: *Cx, uri: []cons const call_side = h == .incoming or h == .outgoing; if (call_side and !c.caps.call_hier) { tr.note("STOP: {s} does not advertise callHierarchyProvider", .{specs[si].name}); - return; + return lsp.none(cx.out, "{s} does not answer call hierarchy (no callHierarchyProvider)", .{specs[si].name}); } if (!call_side and !c.caps.type_hier) { tr.note("STOP: {s} does not advertise typeHierarchyProvider", .{specs[si].name}); - return; + return lsp.none(cx.out, "{s} does not answer type hierarchy (no typeHierarchyProvider)", .{specs[si].name}); } const prepare: []const u8 = if (call_side) "textDocument/prepareCallHierarchy" else "textDocument/prepareTypeHierarchy"; const follow: []const u8 = switch (h) { |
