aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/hover.odin6
-rw-r--r--tests/hover_test.odin4
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")
}
/*