Compliment is a Clojure completion library you deserve. It was inspired by clojure-complete and borrows some implementation details from it. Compliment provides a fast, smart and extensible solution to complete vars, namespaces, class members and whatever else custom sources can implement.
Compliment can be used as a dependency in your project. On the client side, only Emacs is supported for now, but I hope other editors/IDEs will catch up.
Also, I am so glad you came here. You look gorgeous today.
Since clojure-complete is a de-facto standard completion lib for nREPL, here’s the list of distinctive goals Compliment tries to achieve.
- Speed. Your time is too precious to wait for completion to happen. Compliment sacrifices some simplicity in its implementation, and some Emacs auto-complete features to make sure the speed is acceptable on any host. This is mostly a concern when run on Android, because a person like you is curious enough to try Clojure-Android someday.
- Editor agnosticism. Your freedom is important, and you should be able to choose any coding tools you want. This is achieved by having the dumbest client possible (but to the point where speed is not impaired). Ideally editor should not know about completion at all, only giving the prefix to Compliment and showing the results.
- Smart completion. Such a smart person like you is entitled to completion being smart as well. Default Compliment sources use various techniques to give more meaningful completion depending on the context, and allow some fuzziness in prefix.
- Extensibility. Your insatiable passion for exploration won’t be satisfied by a set in stone completion list. For this reason Compliment allows every library developer to write custom sources, so later other users of the library will have better experience utilizing it.
Adding Compliment to the server (application) side is as easy as
specifying this in project.clj
You can also make Compliment available in all projects by adding that line to
:dependencies section of
:user profile inside
Currently only Emacs is supported, by using ac-cider-compliment. You can see client installation details under the link.
Here you can find examples of different completion scenarios Compliment supports so far.
See test files to get an idea how public API and completion sources work.
To understand what is a context and how it works see Context wiki page.
How to write your own sources is explained on Custom sources page.
Copyright © 2013-2014 Alexander Yakushev. Distributed under the Eclipse Public License, the same as Clojure. See LICENSE.