Skip to content

Feat/struct size info on hover - #1662

Closed
giuinktse7 wants to merge 35 commits into
DanielGavin:masterfrom
giuinktse7:feat/struct-size-info-on-hover
Closed

giuinktse7 wants to merge 35 commits into
DanielGavin:masterfrom
giuinktse7:feat/struct-size-info-on-hover

Conversation

@giuinktse7

Copy link
Copy Markdown
Contributor

No description provided.

xdk78 and others added 30 commits July 29, 2025 00:12
- track if field layouts are known
- support more types like scalars, aliases, distinct types, and fixed arrays
- suppress size information for unsupported field types
Detect recursive by-value type layouts and treat them as unknown instead of recursing indefinitely. This prevents OLS from crashing when hovering malformed self-referential or mutually recursive structs.
Calculate SIMD vector layouts using Odin’s target-specific alignment rules.
Keep completion and signature documentation free of hover-only layout details.
This also avoids unnecessary recursive layout calculations.
Render size and alignment as a distinct Markdown section so clients do not combine layout metadata with the struct's documentation.
Add layout mappings for UTF-16 strings, runtime descriptor types, fixed-width booleans, and endian-specific integers and floats.
Support configuration directives, conversions, conditionals, size_of, and align_of when calculating layout attributes and container bounds.
Return an unknown layout when a complement operand is unsigned, context-dependent, or cannot be resolved. This prevents hover information from reporting sizes based on incorrect integer semantics.
@giuinktse7 giuinktse7 closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants