Update config_gen
and data
This commit is contained in:
parent
3500aa7a76
commit
e6996f5f66
@ -248,12 +248,12 @@ fn generateVSCodeConfigFile(allocator: std.mem.Allocator, config: Config, path:
|
|||||||
.type = "string",
|
.type = "string",
|
||||||
.@"enum" = &.{ "off", "messages", "verbose" },
|
.@"enum" = &.{ "off", "messages", "verbose" },
|
||||||
.description = "Traces the communication between VS Code and the language server.",
|
.description = "Traces the communication between VS Code and the language server.",
|
||||||
.default = .{ .String = "off" },
|
.default = .{ .string = "off" },
|
||||||
});
|
});
|
||||||
configuration.putAssumeCapacityNoClobber("zig.zls.checkForUpdate", .{
|
configuration.putAssumeCapacityNoClobber("zig.zls.checkForUpdate", .{
|
||||||
.type = "boolean",
|
.type = "boolean",
|
||||||
.description = "Whether to automatically check for new updates",
|
.description = "Whether to automatically check for new updates",
|
||||||
.default = .{ .Bool = true },
|
.default = .{ .bool = true },
|
||||||
});
|
});
|
||||||
configuration.putAssumeCapacityNoClobber("zig.zls.path", .{
|
configuration.putAssumeCapacityNoClobber("zig.zls.path", .{
|
||||||
.type = "string",
|
.type = "string",
|
||||||
@ -269,15 +269,15 @@ fn generateVSCodeConfigFile(allocator: std.mem.Allocator, config: Config, path:
|
|||||||
errdefer allocator.free(name);
|
errdefer allocator.free(name);
|
||||||
|
|
||||||
const default: ?std.json.Value = blk: {
|
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();
|
defer parser.deinit();
|
||||||
|
|
||||||
var value = try parser.parse(option.default);
|
var value = try parser.parse(option.default);
|
||||||
defer value.deinit();
|
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, .{
|
configuration.putAssumeCapacityNoClobber(name, .{
|
||||||
@ -1051,7 +1051,7 @@ pub fn main() !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const config = try std.json.parseFromSlice(Config, gpa, @embedFile("config.json"), .{});
|
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 generateConfigFile(gpa, config, config_path);
|
||||||
try generateSchemaFile(gpa, config, schema_path);
|
try generateSchemaFile(gpa, config, schema_path);
|
||||||
|
@ -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.
|
\\`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.
|
\\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.
|
||||||
\\
|
\\
|
||||||
|
Loading…
Reference in New Issue
Block a user