Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp how we render type layout information in hover messages #17097

Closed
Veykril opened this issue Apr 18, 2024 · 2 comments
Closed

Revamp how we render type layout information in hover messages #17097

Veykril opened this issue Apr 18, 2024 · 2 comments
Labels
A-ide general IDE features C-enhancement Category: enhancement

Comments

@Veykril
Copy link
Member

Veykril commented Apr 18, 2024

See

For the record, clangd render it in this way: image

It is enabled by default, but only appears in definition hover, not in usage hover.

as an example of what we could do. This is more of a design issue than anything else (though honestly speaking I like our comment approach more ...)

@Veykril Veykril added A-ide general IDE features C-enhancement Category: enhancement labels Apr 18, 2024
@lnicola
Copy link
Member

lnicola commented Apr 18, 2024

Linked screenshot, since the JWT expired:

image

To me, #17096 seems like the more important thing. As long as it's only in the definition, we can even go wild and include the field layout info:

// size = 8, align = 4
#[repr(C)]
struct S {
    x: i32, // size = 4
    y: i8,  // size = 1
    // _padding: [u8; 3], // size = 3
}

@davidbarsky
Copy link
Contributor

I think I'd be happy with showing this information on the definition alone. It avoids some of the annoying questions around configuration that most users won't touch.

@Veykril Veykril closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features C-enhancement Category: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants