From cad50369b0756958e826d7e964b1a3b7ed1504d5 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Sat, 20 Sep 2025 08:50:19 -0400 Subject: Check to see if completion already includes `&` before adding it when matching --- src/server/position_context.odin | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/server/position_context.odin') diff --git a/src/server/position_context.odin b/src/server/position_context.odin index f3f2f68..1aa2ec1 100644 --- a/src/server/position_context.odin +++ b/src/server/position_context.odin @@ -34,6 +34,7 @@ DocumentPositionContext :: struct { tag: ^ast.Node, field: ^ast.Expr, //used for completion call: ^ast.Expr, //used for signature help + call_arg: ^ast.Expr, //used for completion returns: ^ast.Return_Stmt, //used for completion comp_lit: ^ast.Comp_Lit, //used for completion parent_comp_lit: ^ast.Comp_Lit, //used for completion @@ -628,6 +629,11 @@ get_document_position_node :: proc(node: ^ast.Node, position_context: ^DocumentP case ^Call_Expr: position_context.call = n get_document_position(n.expr, position_context) + for arg in n.args { + if position_in_node(arg, position_context.position) { + position_context.call_arg = arg + } + } get_document_position(n.args, position_context) case ^Selector_Call_Expr: position_context.selector = n.expr -- cgit v1.2.3