aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-19 09:13:13 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-19 09:19:45 -0400
commitbeeef74c3b73e1aced5de53d1b6102e1872fa164 (patch)
treeac08de764ad7a655f61512a1f6d996c920916aa0 /src
parent0ab1503c0460e41856b113ed641d1c843282cc83 (diff)
Add hover information for where clause variables
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index 3583a64..27b8f5c 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -4779,6 +4779,13 @@ get_document_position_node :: proc(node: ^ast.Node, position_context: ^DocumentP
} else if position_in_node(n.type, position_context.position) {
position_context.function = cast(^Proc_Lit)node
get_document_position(n.type, position_context)
+ } else {
+ for clause in n.where_clauses {
+ if position_in_node(clause, position_context.position) {
+ position_context.function = cast(^Proc_Lit)node
+ get_document_position(clause, position_context)
+ }
+ }
}
case ^Comp_Lit:
//only set this for the parent comp literal, since we will need to walk through it to infer types.