Skip to content

Feature: "unused" errors as warnings #2154

Open
@Kyren223

Description

@Kyren223

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions