/compliment

The Clojure completion library you deserve

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

Compliment https://img.shields.io/circleci/project/github/alexander-yakushev/compliment/master.svg https://img.shields.io/codecov/c/github/alexander-yakushev/compliment.svg?token=FZTqeuK1hQ https://img.shields.io/badge/dependencies-none-brightgreen.svg https://img.shields.io/clojars/dt/compliment.svg?color=teal https://img.shields.io/badge/-changelog-blue.svg

Compliment is a fast and smart completion library for Clojure. It can complete vars, namespaces, classes, class members, keywords, locals. Users and library authors can also extend Compliment with custom completion sources.

Compliment is used as a completion backend in the following editors/IDEs:

Besides, I am so glad you came here. You look gorgeous today.

Rationale

I wrote Compliment specifically for you because you are amazing and I believe you deserve a matching completion lib. Here are the features it boasts:

  • Speed. Your time is too precious to wait for completion to happen. Compliment is designed to be fast and is carefully benchmarked to make sure no sudden performance drops appear.
  • 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.

Installation

In most Clojure IDEs that use Compliment, you don’t have to install anything at all — it will already be there for you. In case you are a CIDER user you’ll also need to install company-mode and company-quickhelp for optimal results. This guide will help you configure it.

To embed Compliment directly into your program add this to the :dependencies:

https://clojars.org/compliment/latest-version.svg

Examples

Here you can find examples of different completion scenarios Compliment supports.

You can advise Compliment to provide special treatment for certain Vars by attaching metadata to them. See the Metadata page for details.

For developers

See the test files to get an idea how public API and completion sources work.

To understand what is a context and how it works see the Context wiki page.

How to write your own sources is explained on the Custom sources page.

License

Copyright © 2013-2023 Alexander Yakushev. Distributed under the Eclipse Public License, the same as Clojure. See LICENSE.