Open bbatsov opened 10 years ago
Can you give some more specific benefits? Documentation / testing are nice, and so is active maintenance, but switching dependencies is going to require more specific reasons. How exactly will things be better for me as a REPL user?
compliment
supports more completion sources - like interned keywords, special forms, etc. It also offers context sensitive completion (https://github.com/alexander-yakushev/compliment/wiki/Context) and best of all (for REPL users) - fuzzy completion (https://github.com/alexander-yakushev/compliment/wiki/Examples).
I understand the implications in switching deps, but I think it will be well worth it.
The context-sensitive and fuzzy stuff both sound like significant work to implement. Not that they're bad ideas, but currently we only append characters (no backtracking), so the change in jline interaction would be significant.
Actually, it looks like the context-sensitive parts depend on having entire expressions. I don't see how this can work for a command-line REPL since you haven't typed in the closing part of the expression.
Non-static member completion and keywords do seem like obvious improvements.
Actually, it looks like the context-sensitive parts depend on having entire expressions. I don't see how this can work for a command-line REPL since you haven't typed in the closing part of the expression.
This slipped my mind. I maintain Emacs's Clojure REPL, but there I have auto-closing of delimiters and the context can be used fairly easy. Not sure how easy some auto-pairing can be done for REPL-y, but I guess it'll be fairly hard.
Ultimately, it's your call. I'm reasonably sure compliment
is the way to go and I'd love to see more projects rely on it. Advanced features aside, the basic integration will still yield useful improvements for REPL-y's users (at least IMHO).
Yes, auto-pairing like that isn't going to happen without moving to a full text editor in the console. JLine handles a line at a time, so matching delimiters isn't really feasible.
Leaving this open for anyone who wants to implement the basics and see how it goes.
OK, I'll take a stab at this and we'll see how it'll go.
core.complete
is pretty much abandon-ware these days. I'd suggest replacing it the more feature-rich, documented and tested compliment. Not to mention it's actively maintained.As their APIs are pretty similar I expect that swapping
core.complete
withcompliment
should be relatively easy.