vscode-zig icon indicating copy to clipboard operation
vscode-zig copied to clipboard

selecting a Zig version should offer to update `.zigversion` or `build.zig.zon`

Open techatrix opened this issue 1 year ago • 0 comments

A user can manually override which Zig version should be used with the "select and install" menu that can be opened through the status bar or with the "Install Zig" command. Unfortunately, the select Zig version is secretly written into the workspace state of the extension which makes it invisible to the user. Instead, the extension should do the following:

  • remove the hidden workspace state so that the change is reverted when reopening the editor
  • color the context bar item that shows the Zig version in orange (or whatever the Theme uses as the warning color) when the current Zig version does not match the workspace Zig version from .zigversion or build.zig.zon (Related: #245)
  • Show a message that offers to update the .zigversion or build.zig.zon file if a different Zig version is selected.

It would also be possible to even add a minimum_zig_version field to build.zig.zon if is not present already.

techatrix avatar Dec 07 '24 22:12 techatrix