aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-13 22:35:37 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-13 22:35:37 -0400
commit963411cf80140f1231f3b17d76c68d09655ebef4 (patch)
treea11d30a333c1a6f491d93a4212ca96af7d5b62af /src
parente9a3c436d6fc23a1622e59394aff1c34762b2482 (diff)
Revert "Merge pull request #1010 from BradLewis/fix/completions-selector-in-selector-call"
This reverts commit a581608407b82b4816b7fbbe29da97c55c53c33e, reversing changes made to a697921c2556eb14f10fb54117f83dca4fffd027.
Diffstat (limited to 'src')
-rw-r--r--src/server/completion.odin2
-rw-r--r--src/server/position_context.odin5
2 files changed, 1 insertions, 6 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index 7e789f0..aceff60 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -101,8 +101,6 @@ get_completion_list :: proc(
if !position_in_node(selector_call.call, position_context.position) {
completion_type = .Selector
}
- } else if selector, ok := position_context.selector_expr.derived.(^ast.Selector_Expr); ok {
- completion_type = .Selector
}
} else if _, ok := position_context.selector.derived.(^ast.Implicit_Selector_Expr); !ok {
// variadic args seem to work by setting it as an implicit selector expr, in that case
diff --git a/src/server/position_context.odin b/src/server/position_context.odin
index 0417df8..d5e7d33 100644
--- a/src/server/position_context.odin
+++ b/src/server/position_context.odin
@@ -649,10 +649,7 @@ get_document_position_node :: proc(node: ^ast.Node, position_context: ^DocumentP
}
}
case ^Selector_Expr:
- if position_context.hint == .Definition ||
- position_context.hint == .Hover ||
- position_context.hint == .SignatureHelp ||
- position_context.hint == .Completion {
+ if position_context.hint == .Definition || position_context.hint == .Hover && n.field != nil {
position_context.selector = n.expr
position_context.field = n.field
position_context.selector_expr = node