diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 20:54:10 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 20:54:10 -0400 |
| commit | ad58adbd01d1f0481feceb5381f53adba541d021 (patch) | |
| tree | c55293c89b386dab5f7551840d0e9db0c657ff65 /src/server/hover.odin | |
| parent | c96f264f8df3e83d82471f54b63e872ce5116f01 (diff) | |
Correctly handle fixed array #soa
Diffstat (limited to 'src/server/hover.odin')
| -rw-r--r-- | src/server/hover.odin | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index 44fde02..a36dc54 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -349,7 +349,25 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> } case SymbolSliceValue: if .Soa in selector.flags { - if symbol, ok := resolve_soa_selector_field(&ast_context, v.expr, field); ok { + if symbol, ok := resolve_soa_selector_field(&ast_context, v.expr, nil, field); ok { + symbol.pkg = selector.name + build_documentation(&ast_context, &symbol, false) + hover.contents = write_hover_content(&ast_context, symbol) + return hover, true, true + } + } + case SymbolDynamicArrayValue: + if .Soa in selector.flags { + if symbol, ok := resolve_soa_selector_field(&ast_context, v.expr, nil, field); ok { + symbol.pkg = selector.name + build_documentation(&ast_context, &symbol, false) + hover.contents = write_hover_content(&ast_context, symbol) + return hover, true, true + } + } + case SymbolFixedArrayValue: + if .Soa in selector.flags { + if symbol, ok := resolve_soa_selector_field(&ast_context, v.expr, v.len, field); ok { symbol.pkg = selector.name build_documentation(&ast_context, &symbol, false) hover.contents = write_hover_content(&ast_context, symbol) |