-
Notifications
You must be signed in to change notification settings - Fork 38
Metadata
You can advise Compliment to provide specific treatment for ceratin vars by attaching metadata to them. Similarly to how CIDER e.g. allows to customize custom indentation rules for your function/macro by attaching :style/indent metadata, Compliment supports a few such meta keys too.
Adding :completion/hidden true
to a Var will prevent Compliment from offering
that Var as a suggestion candidate, like if it was private. This can be used for
cases where you don’t want to expose and encourage some “private API” to the
user, but at the same time you cannot make it private because the other
namespaces of your library invoke it.
You can mark a macro with this metadata to tell Compliment that your macro can
be searched for locals in the same places as in the respective basic Clojure
macro. For example, you can say :completion/locals :defn
in the metadata of
your macro that defines new functions/macros and expects a name followed by an
arglist (with an optional docsting in-between).