From 75bc2135dbc17e2770c3ec8e3585d481a0b100bb Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:29:45 -0400 Subject: As struct poly info to hover information --- src/server/documentation.odin | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/server') 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 { -- cgit v1.2.3