Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Replace core.complete with compliment #150

Open
bbatsov opened this issue Jul 24, 2014 · 6 comments
Open

[Suggestion] Replace core.complete with compliment #150

bbatsov opened this issue Jul 24, 2014 · 6 comments

Comments

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 24, 2014

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 with compliment should be relatively easy.

@trptcolin
Copy link
Owner

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?

@bbatsov
Copy link
Collaborator Author

bbatsov commented Jul 24, 2014

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.

@trptcolin
Copy link
Owner

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.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Jul 24, 2014

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).

@trptcolin
Copy link
Owner

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.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Jul 25, 2014

OK, I'll take a stab at this and we'll see how it'll go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants