diff --git a/build.zig b/build.zig index c6b53d7..ff04fe4 100644 --- a/build.zig +++ b/build.zig @@ -7,7 +7,7 @@ const zls_version = std.builtin.Version{ .major = 0, .minor = 11, .patch = 0 }; pub fn build(b: *std.build.Builder) !void { comptime { const current_zig = builtin.zig_version; - const min_zig = std.SemanticVersion.parse("0.11.0-dev.3134+018b743c7") catch unreachable; // std.http: do -> wait, fix redirects + const min_zig = std.SemanticVersion.parse("0.11.0-dev.3312+ab37ab33c") catch unreachable; // poly1305: properly cast the mask from u1 to u64 if (current_zig.order(min_zig) == .lt) { @compileError(std.fmt.comptimePrint("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig })); } diff --git a/src/Config.zig b/src/Config.zig index 0a8d3f7..9cef2fb 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -21,7 +21,7 @@ semantic_tokens: enum { none, partial, full, - + pub const tres_string_enum = true; } = .full, diff --git a/src/analyser/InternPool.zig b/src/analyser/InternPool.zig index 050a885..ac3880e 100644 --- a/src/analyser/InternPool.zig +++ b/src/analyser/InternPool.zig @@ -452,8 +452,8 @@ pub const Key = union(enum) { var key: Key = ty; while (true) switch (key) { .simple_type => |simple| switch (simple) { - .usize => return .{ .signedness = .signed, .bits = target.cpu.arch.ptrBitWidth() }, - .isize => return .{ .signedness = .unsigned, .bits = target.cpu.arch.ptrBitWidth() }, + .usize => return .{ .signedness = .signed, .bits = target.ptrBitWidth() }, + .isize => return .{ .signedness = .unsigned, .bits = target.ptrBitWidth() }, .c_char => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.char) }, .c_short => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.short) }, diff --git a/src/configuration.zig b/src/configuration.zig index c5b5740..ee3ea53 100644 --- a/src/configuration.zig +++ b/src/configuration.zig @@ -261,7 +261,7 @@ pub fn findZig(allocator: std.mem.Allocator) !?[]const u8 { const file = std.fs.openFileAbsolute(full_path, .{}) catch continue; defer file.close(); const stat = file.stat() catch continue; - if (stat.kind == .Directory) continue; + if (stat.kind == .directory) continue; return try allocator.dupe(u8, full_path); } diff --git a/src/data/master.zig b/src/data/master.zig index b0e1036..f6aeea0 100644 --- a/src/data/master.zig +++ b/src/data/master.zig @@ -183,8 +183,6 @@ pub const builtins = [_]Builtin{ .snippet = "@boolToInt(${1:value: bool})", .documentation = \\Converts `true` to `@as(u1, 1)` and `false` to `@as(u1, 0)`. - \\ - \\If the value is known at compile-time, the return type is `comptime_int` instead of `u1`. , .arguments = &.{ "value: bool", diff --git a/src/features/completions.zig b/src/features/completions.zig index c4acbff..3f15e90 100644 --- a/src/features/completions.zig +++ b/src/features/completions.zig @@ -993,22 +993,22 @@ fn completeFileSystemStringLiteral( else => unreachable, }; switch (entry.kind) { - .File => if (expected_extension) |expected| { + .file => if (expected_extension) |expected| { const actual_extension = std.fs.path.extension(entry.name); if (!std.mem.eql(u8, actual_extension, expected)) continue; }, - .Directory => {}, + .directory => {}, else => continue, } _ = try completions.getOrPut(arena, types.CompletionItem{ .label = try arena.dupe(u8, entry.name), .detail = if (pos_context == .cinclude_string_literal) path else null, - .insertText = if (entry.kind == .Directory) + .insertText = if (entry.kind == .directory) try std.fmt.allocPrint(arena, "{s}/", .{entry.name}) else null, - .kind = if (entry.kind == .File) .File else .Folder, + .kind = if (entry.kind == .file) .File else .Folder, }); } }