Skip to content

Show type of variables on introspection #469

@leighmcculloch

Description

@leighmcculloch

I've noticed that zls in vscode doesn't display the type when showing more information about a variable. Instead it shows the definition.

Here's an example of what I'm seeing with zls:
zig-language-server

Compared to the information typically shown in other langs (e.g. Go):
go-language-server

According to the lovely folks in Discord (discussion) this is by design and not a bug, but something that could be improved.

The value in improving this is largely driven by the fact that in Zig the types of values are not always found at the location of the declaration. This isn't unique of Zig, plenty of other languages allow for this. ZLS could help provide this introspection that the source itself does not make clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions