Open Techatrix opened 3 weeks ago
Personally I think this would be a great addition and I would even take it one step further:
If a project has a "check" step, enable build on save automatically and use it. Otherwise the user would have to manually enable the build_on_save behavior to avoid unexpected freezes / resource hogging.
Maybe the config file could be changed to accept a "build_on_save_step" field which defaults to "check" when unset (and that does nothing if the defined step doesn't exist).
Lastly, IMO this could also be a good setting to offer per-project and not just as a global config.
Some projects (Example: Tigerbeetle, Ziggy) have added a top-level-step called "check" to their
build.zig
which compiles their project without emitting the final binary. This avoids the extra compilation time spend in LLVM.ZLS should see if the project has such a step and prefer it over the "install" step when running build on save.