Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This page shows examples of how Compliment handles different completions.
Compliment can complete vars in the current namespace. It looks like this:
As you can see, help popup is displayed as well for the completion highlighted in a popup menu.
Scoped completions are covered too:
There is more than that to var completion. Take a look:
For vars containing dashes, you can type only first few symbols for each part between the dashes, and Compliment will figure out what you want!
You can actually skip writing dashes too:
Next, with the help of contexts, Compliment can intelligently complete
:only vars you want to
:use in your
ns declaration (same goes for
In this case the completion shows only vars from
Compliment can do simple namespace completion:
Furthermore, same as for vars, you can specify only first few letters between the periods:
Or without periods:
Tired of typing
clojure.java.io? Just type
cji and press TAB, Compliment
will handle it for you!
Keep in mind that extra fuzziness (i.e. without periods) works only for namespaces that are loaded into the current session to avoid cluttering completion suggestions.
Just like namespaces, Compliment allows you to complete classnames (both short and package-qualified). Fuzzy-completion for classes:
For performance reasons fuzziness works only for classes that are imported into the current namespace. For all others only the basic by-prefix completion is available:
Here’s an example of static class-member completion:
Example of non-static member completion:
Fuzzy-completion for members splits a prefix on camel-case capital letters (like Eclipse does). See this sheer awesomeness:
If even this is not enough for you, check out what happens if you write an object first, and then try to complete a method for it:
Did you see that? Only methods that belong to String are offered! Unfortunately, this is limited to vars that contain objects, since Compliment won’t evaluate the expression at object’s position in order to not mess anything up.
Compliment allows to complete any keyword that was used during the current session (or introduced by any of the libraries):
Compliment can complete local bindings introduced by
defn and the
I’m working on custom completions for Neko library. Right now it can complete keyword resources:
Notice a custom help text that shows the value of the resource string.