zls icon indicating copy to clipboard operation
zls copied to clipboard

show fields without default value prior to fields with default value

Open dacec354 opened this issue 2 months ago • 1 comments

Remember to search before filing a new report

example:

const std = @import("std");

const Foo = struct {
    id: i32 = 0,
    name: []const u8,
};

pub fn main() !void {
    const foo: Foo = .{
        .id = 0, // here
        .name = "default",
    };
    std.debug.print("{}\n", .{foo});
}

when I type . popup shows id prior to name. making name first would be more efficient.


additionally, it would be nice if fields shows its default value in popup.

dacec354 avatar Nov 10 '25 09:11 dacec354

@Techatrix @nektro I would love to pick this one

benodiwal avatar Nov 24 '25 17:11 benodiwal