#VSCode intellisense is not working

1 messages · Page 1 of 1 (latest)

gritty grotto
#

I have a project which links raylib. I used to git submodule and have raylib repo locally, and I tired using package manager build.zig.zon today.
There was auto complete, code suggestions, etc before but after I switched to package manager and removed local raylib I don't have those features. Compiles well, zls and zig path is fine and builds without errors. Just intellisense is gone. Is this normal or I did something wrong?

build.zig.zon

.{
    .name = "dino-zig",
    .version = "0.0.0",

    .dependencies = .{
        .raylib = .{
            .url = "https://github.com/raysan5/raylib/archive/refs/tags/5.0.tar.gz",
            .hash = "1220c28847ca8e8756734ae84355802b764c9d9cf4de057dbc6fc2b15c56e726f27b"
            },
    },
    .paths = .{
        "",
    },
}
#

build.zig

const std = @import("std");

pub fn build(b: *std.Build) void {
    const target = b.standardTargetOptions(.{});

    const optimize = b.standardOptimizeOption(.{});
    //raylib
    const raylib_module = b.dependency("raylib", .{ .optimize = optimize, .target = target });
    const raylib_artifact = raylib_module.artifact("raylib");

    // raygui
    const generate_file_step_raylib_c = b.addWriteFiles();
    const generated_file = generate_file_step_raylib_c.add("raygui/src/raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include <raygui.h>");

    const raygui_artifact = b.addStaticLibrary(.{
        .name = "raygui",
        .root_source_file = generated_file,
        .link_libc = true,
        .optimize = optimize,
        .target = target,
    });
    raygui_artifact.addIncludePath(.{ .path = "deps/raygui/" });
    raygui_artifact.step.dependOn(&generate_file_step_raylib_c.step);

    raygui_artifact.linkLibrary(raylib_artifact);

    const exe = b.addExecutable(.{
        .name = "dino-zig",
        .root_source_file = .{ .path = "src/main.zig" },
        .target = target,
        .optimize = optimize,
    });
    exe.linkLibrary(raygui_artifact);
    exe.linkLibrary(raylib_artifact);
    exe.addIncludePath(.{ .path = "deps/" });

    b.installArtifact(exe);

    const run_cmd = b.addRunArtifact(exe);

    run_cmd.step.dependOn(b.getInstallStep());

    if (b.args) |args| {
        run_cmd.addArgs(args);
    }

    const run_step = b.step("run", "Run the app");
    run_step.dependOn(&run_cmd.step);

    const exe_unit_tests = b.addTest(.{
        .root_source_file = .{ .path = "src/main.zig" },
        .target = target,
        .optimize = optimize,
    });

    const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);

    const test_step = b.step("test", "Run unit tests");
    test_step.dependOn(&run_exe_unit_tests.step);
}