zls
zls copied to clipboard
Enable completion and goto definition/declaration for a value which type is comptime struct
For sample
const builtin = @import("builtin");
pub const DataHdr = if (builtin.cpu.arch.endian() == .big) packed struct {
v: u2 = 0,
p: u1 = 0,
x: u1 = 0,
cc: u4 = 0,
} else packed struct {
cc: u4 = 0,
x: u1 = 0,
p: u1 = 0,
v: u2 = 0,
};
test "simple" {
var hdr: DataHdr = undefined;
hdr.v = 1; // For hdr.v, can't auto complte and goto definition
}