Skip to content
Oleksandr Yakushev edited this page Jul 10, 2023 · 2 revisions

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.

:completion/hidden true

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.

:completion/locals :let|:defn|:letfn|:doseq

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

Clone this wiki locally