diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-11 15:28:53 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-11 15:28:53 -0400 |
| commit | d31fe63071eb65dd57f9fe08442ce45d3688201d (patch) | |
| tree | 4638e342bfc35e80bd4cea651c7821dbe67ab645 /src/server | |
| parent | a631a5d232927c658968c3d6040c46b11f2d412b (diff) | |
Provide completions when defining a variadic argument
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/completion.odin | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 9430235..d1a630a 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -107,7 +107,11 @@ get_completion_list :: proc( completion_type = .Selector } } - } else { + } 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 + // we want an identifier (eg. foo :: proc(args: ..{*})) + + // Otherwise it's a selector completion_type = .Selector } } |