Remove config target from build
The configuration is per-installation and has nothing to do with the build.
This commit is contained in:
parent
2fc9506fdc
commit
443d5c77a7
@ -67,7 +67,7 @@ zig build config # Configure ZLS
|
||||
|
||||
### Configuration Options
|
||||
|
||||
You can configure zls by providing a zls.json file.
|
||||
You can configure zls by running `zls config`.
|
||||
zls will look for a zls.json configuration file in multiple locations with the following priority:
|
||||
- In the local configuration folder of your OS (as provided by [known-folders](https://github.com/ziglibs/known-folders#folder-list))
|
||||
- In the same directory as the executable
|
||||
|
19
build.zig
19
build.zig
@ -2,20 +2,10 @@ const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
// const build_options = @import("build_options")
|
||||
|
||||
const setup = @import("src/setup.zig");
|
||||
|
||||
var builder: *std.build.Builder = undefined;
|
||||
|
||||
pub fn config(step: *std.build.Step) anyerror!void {
|
||||
try setup.wizard(builder.allocator, builder.exe_dir);
|
||||
}
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
builder = b;
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
|
||||
const mode = b.standardReleaseOptions();
|
||||
@ -35,15 +25,6 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
|
||||
b.installFile("src/special/build_runner.zig", "bin/build_runner.zig");
|
||||
|
||||
const run_cmd = exe.run();
|
||||
run_cmd.step.dependOn(b.getInstallStep());
|
||||
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const configure_step = b.step("config", "Configure zls");
|
||||
configure_step.makeFn = config;
|
||||
|
||||
const test_step = b.step("test", "Run all the tests");
|
||||
test_step.dependOn(builder.getInstallStep());
|
||||
|
||||
|
@ -175,14 +175,7 @@ pub fn wizard(allocator: *std.mem.Allocator, exe_dir: []const u8) !void {
|
||||
},
|
||||
}
|
||||
|
||||
std.debug.warn(
|
||||
\\
|
||||
\\You can find the ZLS executable in the "zig-cache/bin" by default.
|
||||
\\NOTE: Make sure that if you move the ZLS executable, you move the `zls.json` config file with it as well!
|
||||
\\And finally: Thanks for choosing ZLS!
|
||||
\\
|
||||
\\
|
||||
, .{});
|
||||
std.debug.warn("\n\nThank you for choosing ZLS!\n", .{});
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user