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

[Feature Suggest] Do not autofix when vscode autosave after delay

Open NoahELE opened this issue 2 years ago • 1 comments

I have vscode autosave set to after delay, the zig extension automatically auto fixes uncompleted code.

For example, when I create a new function fn add(a: i32, b: i32) !void {}, the zig extension automatically adds _ = a; _ = b; to funtion body to avoid unused vars before I try to write the actual code. If I delete the lines, it keeps coming back.

So I suggest to only auto fix when Ctrl + S is pressed when autosave is set to after delay.

NoahELE avatar Oct 31 '23 07:10 NoahELE

This should get fixed by https://github.com/zigtools/zls/pull/1642

Techatrix avatar Dec 01 '23 00:12 Techatrix

I just checked and https://github.com/zigtools/zls/pull/1642 did indeed fix the issue.

Techatrix avatar Apr 05 '24 23:04 Techatrix