diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-07 22:06:22 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-11 16:34:21 -0400 |
| commit | 151fb26f5957338f670d2d6dbef01d75ff28cc8e (patch) | |
| tree | 2864c82b068f56c5bc7b69874cf97f8f8ca8ceae /src/server/hover.odin | |
| parent | 790cf8a16315d65bd80478aecfb34d7ff5dae31b (diff) | |
Attempt consolidate structure for writing docs
Diffstat (limited to 'src/server/hover.odin')
| -rw-r--r-- | src/server/hover.odin | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index 4719685..cba2234 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -34,7 +34,7 @@ write_hover_content :: proc(ast_context: ^AstContext, symbol: Symbol) -> MarkupC } } - cat := concatenate_symbol_information(ast_context, symbol) + cat := construct_symbol_information(ast_context, symbol) doc := construct_symbol_docs(symbol) if cat != "" { @@ -410,9 +410,11 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> } if resolved, ok := resolve_type_identifier(&ast_context, ident); ok { - resolved.type_name = resolved.name - resolved.type_pkg = resolved.pkg - resolved.name = ident.name + if resolved.name != ident.name { + resolved.type_name = resolved.name + resolved.type_pkg = resolved.pkg + resolved.name = ident.name + } if resolved.type == .Variable { resolved.pkg = ast_context.document_package } |