diff --git a/README.md b/README.md index 8d59a30..3c079a4 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.zig b/build.zig index 502d4bb..68ca0c5 100644 --- a/build.zig +++ b/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()); diff --git a/src/setup.zig b/src/setup.zig index d97ceda..e6d51f8 100644 --- a/src/setup.zig +++ b/src/setup.zig @@ -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", .{}); }