Update config_gen and data

This commit is contained in:
nullptrdevs 2023-05-18 21:23:17 -07:00
parent 3500aa7a76
commit e6996f5f66
2 changed files with 7 additions and 7 deletions

View File

@ -248,12 +248,12 @@ fn generateVSCodeConfigFile(allocator: std.mem.Allocator, config: Config, path:
.type = "string",
.@"enum" = &.{ "off", "messages", "verbose" },
.description = "Traces the communication between VS Code and the language server.",
.default = .{ .String = "off" },
.default = .{ .string = "off" },
});
configuration.putAssumeCapacityNoClobber("zig.zls.checkForUpdate", .{
.type = "boolean",
.description = "Whether to automatically check for new updates",
.default = .{ .Bool = true },
.default = .{ .bool = true },
});
configuration.putAssumeCapacityNoClobber("zig.zls.path", .{
.type = "string",
@ -269,15 +269,15 @@ fn generateVSCodeConfigFile(allocator: std.mem.Allocator, config: Config, path:
errdefer allocator.free(name);
const default: ?std.json.Value = blk: {
if (option.@"enum" != null) break :blk .{ .String = option.default };
if (option.@"enum" != null) break :blk .{ .string = option.default };
var parser = std.json.Parser.init(allocator, false);
var parser = std.json.Parser.init(allocator, .alloc_always);
defer parser.deinit();
var value = try parser.parse(option.default);
defer value.deinit();
break :blk if (value.root != .Null) value.root else null;
break :blk if (value.root != .null) value.root else null;
};
configuration.putAssumeCapacityNoClobber(name, .{
@ -1051,7 +1051,7 @@ pub fn main() !void {
}
const config = try std.json.parseFromSlice(Config, gpa, @embedFile("config.json"), .{});
defer std.json.parseFree(Config, config, .{});
defer std.json.parseFree(Config, gpa, config);
try generateConfigFile(gpa, config, config_path);
try generateSchemaFile(gpa, config, schema_path);

View File

@ -1067,7 +1067,7 @@ pub const builtins = [_]Builtin{
\\
\\`dest` must be a mutable slice, a mutable pointer to an array, or a mutable many-item [pointer](https://ziglang.org/documentation/master/#Pointers). It may have any alignment, and it may have any element type.
\\
\\Likewise, `source` must be a mutable slice, a mutable pointer to an array, or a mutable many-item [pointer](https://ziglang.org/documentation/master/#Pointers). It may have any alignment, and it may have any element type.
\\`source` must be a slice, a pointer to an array, or a many-item [pointer](https://ziglang.org/documentation/master/#Pointers). It may have any alignment, and it may have any element type.
\\
\\The `source` element type must support [Type Coercion](https://ziglang.org/documentation/master/#Type-Coercion) into the `dest` element type. The element types may have different ABI size, however, that may incur a performance penalty.
\\