zls icon indicating copy to clipboard operation
zls copied to clipboard

Feature: "unused" errors as warnings

Open Kyren223 opened this issue 11 months ago • 0 comments

Add an option in the config to turn some zig errors into LSP warnings instead of errors For example: Unused variable/parameter etc Used variable with a _ = my_var; stmt error

An enum option would make the most sense, by default it'll be "error" (current behaviour) but can also be "warn" (warning diagnostics) or "ignore" to not show these as diagnostics

I know there is the autofix but I find it intrusive and also it doesn't work well, sometimes it adds the statements but sometimes it just doesn't, or opens up a code action menu to individually select which variables to ignore.

Kyren223 avatar Jan 28 '25 12:01 Kyren223