aboutsummaryrefslogtreecommitdiff
path: root/src/server/hover.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-07 20:29:30 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-07 20:53:27 -0400
commit8ec7acff2b5a4a628d09ad3fe4f4b8f74fb8d856 (patch)
tree7cb50ad364e5ca369e135d40ac054398888b2de8 /src/server/hover.odin
parent41c5c76526aad8ca69525abfed045d501171fe24 (diff)
Fix hover on external package structs returned from procedures
Diffstat (limited to 'src/server/hover.odin')
-rw-r--r--src/server/hover.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin
index 9dbfc2d..b69385a 100644
--- a/src/server/hover.odin
+++ b/src/server/hover.odin
@@ -228,7 +228,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
if symbol, ok := resolve_type_expression(&ast_context, v.types[i]); ok {
symbol.name = name
symbol.pkg = selector.name
- symbol.signature = common.node_to_string(v.types[i])
+ symbol.signature = get_signature(&ast_context, v.types[i].derived, symbol)
hover.contents = write_hover_content(&ast_context, symbol)
return hover, true, true
}
@@ -250,6 +250,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
if position_context.field != nil {
if ident, ok := position_context.field.derived.(^ast.Ident); ok {
if symbol, ok := resolve_type_identifier(&ast_context, ident^); ok {
+ symbol.signature = get_signature(&ast_context, ident, symbol)
hover.contents = write_hover_content(&ast_context, symbol)
return hover, true, true
}