Replies: 1 comment 1 reply
-
Without knowing anything about the custom buildsystem tool I can't give a clear answer but how having your buildsystem tool generate a This example should be enough for ZLS to find some modules: const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const mod1 = b.addModule("mod1", .{ .root_source_file = b.path("<path>") });
const mod2 = b.addModule("mod2", .{ .root_source_file = b.path("<path>") });
const mod3 = b.addModule("mod3", .{ .root_source_file = b.path("<path>") });
const exe = b.addExecutable(.{
.name = "fake",
.root_source_file = b.path("<path>"),
.target = target,
.optimize = optimize,
});
b.installArtifact(exe);
exe.root_module.addImport("<name>", mod1);
exe.root_module.addImport("<name>", mod2);
exe.root_module.addImport("<name>", mod3);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing a custom buildsystem tool, so relying on
build.zig
functionality does not solve the problem.So I was wondering if there is a way to explicitly specify paths where zls will search for modules 🤔
Beta Was this translation helpful? Give feedback.
All reactions