zls icon indicating copy to clipboard operation
zls copied to clipboard

inlay hints for merged error sets show the entire body of the error type

Open xdBronch opened this issue 1 year ago • 0 comments

Zig Version

0.12.0-dev.3245+4f782d1e8

Zig Language Server Version

0.12.0-dev.490+fd3b5af

Client / Code Editor / Extensions

No response

Steps to Reproduce and Observed Behavior

test {
    const not_merged = @as(error{ a, b, c, d, e, f, g, h }, undefined);
    const merged = @as(error{ a, b, c, d } || error{ e, f, g, h }, undefined);

    _ = not_merged;
    _ = merged;
}

image

the problem becomes much worse with many error types in the stdlib due to doc comments on each error

Expected Behavior

error set should be truncated similar to what was done in #1822

Relevant log output

No response

xdBronch avatar Mar 13 '24 21:03 xdBronch