Vscode and Zig and alias

When I declare an alias in a file like:
pub const FixedInts = std.BoundedArray(u32, 16);

and use it in another file:
const ints: FixedInts = ....

-vscode (F12 jump to declaration) jumps directly to the declaration of std.BoundedArray instead of my alias.
-vscode fails to give an /// comment I put above FixedInts.

That is quite inconvenient, is there a way to fix this?

I tried it in an other editor and it’s a language server problem.
I think it is this bug: Go To Declaration fails with aliasing #2054

Maybe it is not. I see now there is “go to definition” and “go to declaration”.
The latter jumps correctly.

5 Likes