Does ZLS autocomplete work with the package manager?

Im currently learning vulkan and using a cimport because it was easier than getting the vulkan zig bindings to work. Now im trying to use zigimg to load textures, and to my surprise i got it to work in a few minutes with the new package manager.

However, ZLS autocomplete doesn’t seem to work for zigimg (it does work for cimported vulkan and it also worked for the other more clunky ways I added packages in the past)

I’ve spent all day trying to fix this, including updating zls and zig, downgrading zls and zig after i broke zigimg, manually sifting through the zls and zig issues related to the package manager, and searching ziggit for examples of the new package manager in use, but the only recent post about the pm only had c libraries as dependencies.

Any help or just general advice is greatly appreciated.

Related info below (also im using vscodium if that matters):

this issue seems to be the closest to the issue im having, and its marked as completed, which leads me to believe this might be my fault.

this reply seems to imply i could get an error log, but the original reply is deleted

Relevant section of the build.zig:

const exe = b.addExecutable(.{
        .name = "vulkan test",
        .root_source_file = .{ .path = "src/main.zig" },
        .target = target,
        .optimize = optimize,
    });

    const zigimg = b.dependency("zigimg", .{
        .target = target,
        .optimize = optimize,
    });

    exe.addModule("zigimg", zigimg.module("zigimg"));

    exe.linkSystemLibrary("glfw");
    exe.linkSystemLibrary("vulkan");
    exe.linkSystemLibrary("c");

and my build.zig.zon:

.{
    .paths = .{""},
    .name = "vulkan-test",
    .version = "0.0.1",
    .dependencies = .{
        .zigimg = .{
            .url = "https://github.com/zigimg/zigimg/archive/130e63c0ad1e753204ee0c5675b6efde67b6ab3f.tar.gz",
            .hash = "122020bfa2caf1bef0d1eeb9e8874f9578e93300cedb57e548f87d94d0e2f0833e0e",
        },
    },
}

2 Likes