zls icon indicating copy to clipboard operation
zls copied to clipboard

buildOnSave doesn't seem to do anything

Open Srekel opened this issue 3 years ago • 3 comments

Zig format and other things seem to work fine, but I tried enabling buildOnSave and as far as I can tell, it doesn't do anything.

I'm on Windows 10, latest public VS Code, latest zls, zig from a few days ago.

Settings:

  "[zig]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "tiehuis.zig",
  },
  "zig.buildOnSave": true,
  "zig.buildOption": "build",
  "zigLanguageClient.path": "E:/Projects/external/zls/zig-out/bin/zls.exe",

Let me know if I can do anything to provide more info.

Srekel avatar Mar 27 '22 07:03 Srekel

It actually does something. It compiles your code and gives you some compile error diagnostics.

If you save your project and don't have any errors, you can run the project and you'll find that it doesn't just start compiling your code

bayo-code avatar Apr 07 '22 02:04 bayo-code

Hm, I made sure that the code wouldn't compile and then saved but got no feedback that it was wrong or that it compiled.

Srekel avatar Apr 07 '22 05:04 Srekel

do you have both the zig and the zls extension installed?

nektro avatar Apr 07 '22 19:04 nektro

This is an issue with the Zig extension and not the ZLS extension.

SuperAuguste avatar Nov 16 '22 22:11 SuperAuguste