diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-05 21:03:04 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-05 21:03:04 -0400 |
| commit | e81770b1ededb36770fd2393feb2d4450df445ef (patch) | |
| tree | e268b68ca29d65170e90781d39f745f1411e7887 | |
| parent | 7ee64314fdd05984c65b1aa6df7ef3cd2dd435cd (diff) | |
Update implicit expression hover text to include package
| -rw-r--r-- | src/server/hover.odin | 6 | ||||
| -rw-r--r-- | tests/hover_test.odin | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index d378696..cc3c5b2 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -241,8 +241,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> case SymbolEnumValue: for name, i in v.names { if strings.compare(name, implicit_selector.field.name) == 0 { - symbol.pkg = symbol.name - symbol.name = name + symbol.signature = fmt.tprintf(".%s", name) hover.contents = write_hover_content(&ast_context, symbol) return hover, true, true } @@ -251,8 +250,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> if enum_value, ok := unwrap_super_enum(&ast_context, v); ok { for name, i in enum_value.names { if strings.compare(name, implicit_selector.field.name) == 0 { - symbol.pkg = symbol.name - symbol.name = name + symbol.signature = fmt.tprintf(".%s", name) hover.contents = write_hover_content(&ast_context, symbol) return hover, true, true } diff --git a/tests/hover_test.odin b/tests/hover_test.odin index dafc81c..028fbdb 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -390,7 +390,7 @@ ast_hover_enum_implicit_selector :: proc(t: ^testing.T) { ` } - test.expect_hover(t, &source, "Foo.Foo1") + test.expect_hover(t, &source, "test.Foo: .Foo1") } @(test) @@ -409,7 +409,7 @@ ast_hover_union_implicit_selector :: proc(t: ^testing.T) { ` } - test.expect_hover(t, &source, "Bar.Foo1") + test.expect_hover(t, &source, "test.Bar: .Foo1") } /* |