aboutsummaryrefslogtreecommitdiff
path: root/src/server/hover.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-17 20:54:10 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-17 20:54:10 -0400
commitad58adbd01d1f0481feceb5381f53adba541d021 (patch)
treec55293c89b386dab5f7551840d0e9db0c657ff65 /src/server/hover.odin
parentc96f264f8df3e83d82471f54b63e872ce5116f01 (diff)
Correctly handle fixed array #soa
Diffstat (limited to 'src/server/hover.odin')
-rw-r--r--src/server/hover.odin20
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)