diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-01 09:29:45 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-01 09:29:45 -0400 |
| commit | 75bc2135dbc17e2770c3ec8e3585d481a0b100bb (patch) | |
| tree | 1633c8d7b7d98eb990c8143f7cffd6c54ec7a957 /src/server | |
| parent | 8e6ddab0ed0b17230103d4a4a563c7f6b3b6e775 (diff) | |
As struct poly info to hover information
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/documentation.odin | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin index 3be174f..9e23b52 100644 --- a/src/server/documentation.odin +++ b/src/server/documentation.odin @@ -274,7 +274,19 @@ write_struct_hover :: proc(ast_context: ^AstContext, sb: ^strings.Builder, v: Sy using_index := -1 - strings.write_string(sb, "struct {\n") + strings.write_string(sb, "struct") + if v.poly != nil { + strings.write_string(sb, "(") + for field in v.poly.list { + for name in field.names { + build_string_node(name, sb, false) + } + strings.write_string(sb, ": ") + build_string_node(field.type, sb, false) + } + strings.write_string(sb, ")") + } + strings.write_string(sb, " {\n") for i in 0 ..< len(v.names) { if i < len(v.from_usings) { if index := v.from_usings[i]; index != using_index { |