{"id":13646129,"url":"https://github.com/alexander-yakushev/compliment","last_synced_at":"2025-05-14T12:09:35.108Z","repository":{"id":37886705,"uuid":"11936590","full_name":"alexander-yakushev/compliment","owner":"alexander-yakushev","description":"Clojure completion library that you deserve","archived":false,"fork":false,"pushed_at":"2025-03-27T21:11:23.000Z","size":2232,"stargazers_count":360,"open_issues_count":11,"forks_count":39,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-11T04:59:13.731Z","etag":null,"topics":["autocomplete","cider","clojure"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexander-yakushev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-06T23:03:07.000Z","updated_at":"2025-04-07T13:19:11.000Z","dependencies_parsed_at":"2023-02-19T01:46:15.526Z","dependency_job_id":"a53a6353-7366-4dde-8d64-aa7e790e4790","html_url":"https://github.com/alexander-yakushev/compliment","commit_stats":{"total_commits":382,"total_committers":24,"mean_commits":"15.916666666666666","dds":"0.17015706806282727","last_synced_commit":"46c0499c573c85c730738a1fdef783521d9fda64"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-yakushev%2Fcompliment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-yakushev%2Fcompliment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-yakushev%2Fcompliment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-yakushev%2Fcompliment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexander-yakushev","download_url":"https://codeload.github.com/alexander-yakushev/compliment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345273,"owners_count":21088244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","cider","clojure"],"created_at":"2024-08-02T01:02:49.115Z","updated_at":"2025-04-11T04:59:26.679Z","avatar_url":"https://github.com/alexander-yakushev.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# Compliment [![](https://img.shields.io/circleci/project/github/alexander-yakushev/compliment/master.svg)](https://circleci.com/gh/alexander-yakushev/compliment) [![](https://img.shields.io/codecov/c/github/alexander-yakushev/compliment.svg?token=FZTqeuK1hQ)](https://codecov.io/github/alexander-yakushev/compliment) [![](https://img.shields.io/badge/dependencies-none-brightgreen.svg)](https://versions.deps.co/alexander-yakushev/compliment) [![](https://img.shields.io/clojars/dt/compliment.svg?color=teal)](https://clojars.org/compliment) [![](https://img.shields.io/badge/-changelog-blue.svg)](CHANGELOG.md)\n\nCompliment is a fast and smart completion library for Clojure. It can complete\n[vars](https://github.com/alexander-yakushev/compliment/wiki/Examples#vars),\n[namespaces](https://github.com/alexander-yakushev/compliment/wiki/Examples#namespaces),\n[classes](https://github.com/alexander-yakushev/compliment/wiki/Examples#classes),\n[class\nmembers](https://github.com/alexander-yakushev/compliment/wiki/Examples#static-members),\n[keywords](https://github.com/alexander-yakushev/compliment/wiki/Examples#keywords),\n[locals](https://github.com/alexander-yakushev/compliment/wiki/Examples#local-bindings).\nUsers and library authors can also extend Compliment with custom completion\nsources.\n\nCompliment is used as a completion backend in the following editors/IDEs:\n\n- Emacs — [CIDER](https://cider.readthedocs.io/en/latest/code_completion/)\n- Vim — [vim-fireplace](https://github.com/tpope/vim-fireplace)\n- Visual Studio Code — [Calva](https://calva.io/)\n- [rebel-readline](https://github.com/bhauman/rebel-readline/)\n\nMost importantly, I am very glad you came here. You look gorgeous today.\n\n## Rationale\n\nI wrote Compliment specifically for you because you are amazing and I believe\nyou deserve a matching completion lib. Here are the features it boasts:\n\n- **Speed.** Your time is too precious to wait for completion to happen.\nCompliment is designed to be fast and is carefully benchmarked to make sure no\nsudden performance drops appear.\n- **Smart completion.** Such a smart person like you is entitled to completion\nbeing smart as well. Default Compliment sources use various techniques to give\nmore meaningful completion depending on the context, and allow some fuzziness in\nprefix.\n- **Extensibility.** Your insatiable passion for exploration won't be satisfied\nby a set in stone completion list. For this reason Compliment allows every\nlibrary developer to write custom sources, so later other users of the library\nwill have better experience utilizing it.\n\n## Installation\n\nIn most Clojure IDEs that use Compliment, you don't have to install anything at\nall — it will already be there for you. In case you are a CIDER user you'll also\nneed to install [company-mode](http://company-mode.github.io/) and\n[company-quickhelp](https://github.com/expez/company-quickhelp) for optimal\nresults. This [guide](https://docs.cider.mx/cider/usage/code_completion.html)\nwill help you configure it.\n\nTo embed Compliment directly into your program add this to the `:dependencies`:\n\n[![](https://clojars.org/compliment/latest-version.svg)](https://clojars.org/compliment)\n\nIf you don't want to pull a dependency, check [Compliment-lite](lite).\n\n## For users\n\nHere are the\n[examples](https://github.com/alexander-yakushev/compliment/wiki/Examples) of\ndifferent completion scenarios Compliment supports.\n\nYou can advise Compliment to provide special treatment for certain Vars by\nattaching metadata to them. See the\n[Metadata](https://github.com/alexander-yakushev/compliment/wiki/Metadata) page\nfor details.\n\n## For developers\n\nCompliment's primary public function is `completions`:\n\n```clj\n=\u003e (require 'compliment.core)\n=\u003e (compliment.core/completions \"compl\")\n({:candidate \"complement\", :type :function, :ns \"clojure.core\"}\n {:candidate \"completing\", :type :function, :ns \"clojure.core\"}\n {:candidate \"compliment.core\", :type :namespace, :file \"compliment/core.clj\"}\n {:candidate \"compliment.utils\", :type :namespace, :file \"compliment/utils.clj\"}\n ...)\n```\n\n`completions` can accept a map of options as a second argument. The supported options are:\n\n- `:ns` — complete within the provided namespace\n- `:context` — enable richer completions, see\n  [Context](https://github.com/alexander-yakushev/compliment/wiki/Context).\n- `:sort-order` — how to sort resulting candidates, either `:by-length`\n  (default) or `:by-name`.\n- `:extra-metadata` — a list of keywords for extra metadata to attach to each\n  candidate. Only used for completing vars. The values can be `:doc`,\n  `:arglists`, `:deprecated`, `:private`.\n- `:sources` — a list of sources names that should be used when generating\n  candidates. The name of the source is a keyword passed to `defsource` in each\n  [source namespace](src/compliment/sources). If not provided, all sources will\n  be used.\n\nThe second public function is `documentation`. It can be used for generating tooltip messages when the completion candidate is highlighted in the UI:\n\n```clj\n=\u003e (println (compliment.core/documentation \".substring\"))\n\njava.lang.StringBuilder.substring\n  (int int) -\u003e String (public volatile)\n  (int) -\u003e String (public volatile)\n\njava.lang.StringBuffer.substring\n  (int int) -\u003e String (public synchronized)\n  (int) -\u003e String (public synchronized)\n\njava.lang.String.substring\n  (int int) -\u003e String (public)\n  (int) -\u003e String (public)\n```\n\nSee [tests](test/compliment/t_core.clj) for more examples and details.\n\nWriting your own sources is explained in [Custom\nsources](https://github.com/alexander-yakushev/compliment/wiki/Custom-sources).\n\n## License\n\nCopyright © 2013-2025 Oleksandr Yakushev. Distributed under the Eclipse Public\nLicense. See\n[LICENSE](https://github.com/alexander-yakushev/compliment/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-yakushev%2Fcompliment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexander-yakushev%2Fcompliment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-yakushev%2Fcompliment/lists"}