Good tab completions means dynamically generated using reflection or whatever (that does not require pre-defined list of completions somewhere) and that knows what can and what can't follow in particular place.
Like in (.<TAB> x)
I'll get list of methods of x, in (println <TAB>)
I get list of local and global definitions, in (Math/<TAB>
I get the list of math functions...
For example I like how Tab works in ghci (Haskell) or ipython.
Have a look at reply for a better REPL than the default one. It covers two out of three use cases you mention, leaving the Java instance method completion out.
If you use leiningen v2+ it's the default REPL invoked by the lein repl
command.
It is certainly possible and several of the tools are evolving in that direction. The newest version of clojure includes a "development mode" option that makes building this sort of tool easier; for instance it turns off local clearing to aid in debugging and the intention is for it to be able to eventually export a lot more information about the compilation process for use by IDEs and related tools. This is widely recognized as an area to improve the Clojure ecosystem and from my observations several very smart people are working on it.
The current beta version of the Eclipse CounterClockwise REPL has greatly improved code completion, and covers all your cases, including Java completion. Except of course not being a standalone commandline REPL. Clojure being a dynamic language however has it's limitations on completions on type, something that's a lot easier in strongly typed languages like Haskell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With