zls
zls copied to clipboard
Inlay hints for struct initialization
Everything in the angle brackets (<this>) represent a inlay hint.
Hovering over alpha in the struct init can already show the type, so adding a type hint should be easy to do.
const foo: struct { alpha: u32 } = .{ .alpha<u32> = 5 };
These type hints may be a bit harder to implement.
const foo: struct { u32, []const u8 } = .{ <u32>3, <[]const u8>"" };
const alpha: u32, const beta: []const u8 = .{ <u32>3, <[]const u8>"" };