Typeaware autocompletion

I think the REPL autocomplete does something similar already – when you have e.g.

struct Foo
  a::Int
end
[Foo(1), Foo(2)][1].\tab

you get a autocompleted. IIRC, Julia looks at the return type of the expression before the dot and then finds its return type, which you could also do for pipes.