Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: "unused" errors as warnings #2154

Open
Kyren223 opened this issue Jan 28, 2025 · 0 comments
Open

Feature: "unused" errors as warnings #2154

Kyren223 opened this issue Jan 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Kyren223
Copy link

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 Kyren223 added the enhancement New feature or request label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant