From 5ddbf24d110878d0d1b96e52860fa106fef57537 Mon Sep 17 00:00:00 2001 From: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com> Date: Fri, 21 Oct 2022 12:24:26 -0400 Subject: [PATCH] Fix diagnostics (#716) --- src/Server.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Server.zig b/src/Server.zig index e79237e..9bccbe8 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -368,6 +368,8 @@ fn getAstCheckDiagnostics( var line_iterator = std.mem.split(u8, stderr_bytes, "\n"); while (line_iterator.next()) |line| lin: { + if (!std.mem.startsWith(u8, line, "")) continue; + var pos_and_diag_iterator = std.mem.split(u8, line, ":"); const maybe_first = pos_and_diag_iterator.next(); if (maybe_first) |first| { @@ -1534,7 +1536,7 @@ fn initializeHandler(server: *Server, writer: anytype, id: types.RequestId, req: // NOTE: everything is initialized, we got the client capabilities // so we can now format the prebuilt builtins items for labelDetails if (server.client_capabilities.label_details_support) { - for(server.builtin_completions.items) |*item| { + for (server.builtin_completions.items) |*item| { try formatDetailledLabel(item, std.heap.page_allocator); } }