diff --git a/src/data/generate-vscode-config.js b/src/data/generate-vscode-config.js index 61e5d4a..599566d 100644 --- a/src/data/generate-vscode-config.js +++ b/src/data/generate-vscode-config.js @@ -32,8 +32,6 @@ for (const line of lines) { const name = line.split(":")[0].trim(); const type = line.split(":")[1].split("=")[0].trim(); const defaultValue = line.split(":")[1].split("=")[1].trim().replace(",",""); - - // console.log(name, type, defaultValue); console.log(`"zls.${name}": ${JSON.stringify({ "scope": "resource", diff --git a/src/main.zig b/src/main.zig index 7492342..98a5763 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1756,6 +1756,7 @@ fn initializeHandler(arena: *std.heap.ArenaAllocator, id: types.RequestId, req: fn registerCapability(arena: *std.heap.ArenaAllocator, method: []const u8) !void { // NOTE: stage1 moment occurs if we dont do it like this :( // long live stage2's not broken anon structs + logger.debug("Dynamically registering method '{s}'", .{method}); const id = try std.fmt.allocPrint(arena.allocator(), "register-{s}", .{method}); @@ -1778,8 +1779,6 @@ fn registerCapability(arena: *std.heap.ArenaAllocator, method: []const u8) !void .params = respp, }; - std.log.info("AAAAA {s}", .{req}); - try send(arena, req); } @@ -2241,10 +2240,8 @@ fn processJsonRpc(arena: *std.heap.ArenaAllocator, parser: *std.json.Parser, jso else => types.RequestId{ .Integer = 0 }, } else types.RequestId{ .Integer = 0 }; - if (id == .String and std.mem.startsWith(u8, id.String, "register")) { - logger.info("INFO!!! {s}", .{json}); + if (id == .String and std.mem.startsWith(u8, id.String, "register")) return; - } if (id == .String and std.mem.eql(u8, id.String, "i_haz_configuration")) { logger.info("Setting configuration...", .{}); diff --git a/tests/sessions.zig b/tests/sessions.zig index 303912e..ca361c1 100644 --- a/tests/sessions.zig +++ b/tests/sessions.zig @@ -66,7 +66,7 @@ const Server = struct { const rest = response_bytes[json_fmt.len..]; const id_end = std.mem.indexOfScalar(u8, rest, ',') orelse return error.InvalidResponse; - const id = try std.fmt.parseInt(u32, rest[0..id_end], 10); + const id = std.fmt.parseInt(u32, rest[0..id_end], 10) catch continue; if (id != self.request_id) { continue; @@ -83,6 +83,7 @@ const Server = struct { } } } + fn extractError(msg: []const u8) !void { const log_request = \\"method":"window/logMessage","params":{"type":