From a5f518d57defb3e5f37387057722952b26160ab8 Mon Sep 17 00:00:00 2001 From: Techatrix Date: Tue, 12 Nov 2024 04:45:25 +0100 Subject: [PATCH] ignore unknown fields in initialization options --- src/Server.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Server.zig b/src/Server.zig index 09ca51f6f..663ed84c2 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -551,7 +551,9 @@ fn initializeHandler(server: *Server, arena: std.mem.Allocator, request: types.I server.status = .initializing; if (request.initializationOptions) |initialization_options| { - if (std.json.parseFromValueLeaky(Config, arena, initialization_options, .{})) |new_cfg| { + if (std.json.parseFromValueLeaky(Config, arena, initialization_options, .{ + .ignore_unknown_fields = true, + })) |new_cfg| { try server.updateConfiguration2(new_cfg, .{}); } else |err| { log.err("failed to read initialization_options: {}", .{err});