Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

clojure-emacs/ac-cider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 

Repository files navigation

ac-cider

Deprecation notice

This package is deprecated as of 2018-02-12 in favor of company-mode. CIDER supports company-mode out of the box, and company now has all the features of auto-complete and then some, namely:

Migrating to company-mode is easy, follow the docs to enable and configure it. You are not required to give up auto-complete altogether, you can use company-mode for Clojure and auto-complete for other modes.

About

ac-cider is a completion source for Emacs auto-complete package that uses CIDER (and Compliment) as candidates provider.

ac-cider is the successor of the now deprecated ac-nrepl which uses clojure-complete as backend.

Installation

ac-cider is available as a package in MELPA repository. You can install it from there like:

M-x package-install ac-cider

ac-cider depends on auto-complete and cider which will be downloaded automatically.

ac-cider provides a CIDER-specific completion source, so auto-complete needs to be told to use it when cider-mode is active. To do this, put the following code in your Emacs init file:

(require 'ac-cider)
(add-hook 'cider-mode-hook 'ac-flyspell-workaround)
(add-hook 'cider-mode-hook 'ac-cider-setup)
(add-hook 'cider-repl-mode-hook 'ac-cider-setup)
(eval-after-load "auto-complete"
  '(progn
     (add-to-list 'ac-modes 'cider-mode)
     (add-to-list 'ac-modes 'cider-repl-mode)))

By default, entries in the popup menu will also display the namespace that the symbol belongs to. To disable this behavior, add to your init file:

(setq ac-cider-show-ns nil)

If you want to trigger auto-complete using TAB in CIDER buffers, add this to your configuration file (but note that it is incompatible with (setq tab-always-indent 'complete)):

(defun set-auto-complete-as-completion-at-point-function ()
  (setq completion-at-point-functions '(auto-complete)))

(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function)
(add-hook 'cider-mode-hook 'set-auto-complete-as-completion-at-point-function)

Usage

ac-cider should now automatically be enabled when you visit a buffer in which cider-mode is active and auto-complete is enabled. (The symbols “cider” and “AC” should appear in the modeline.)

Simply trigger auto-completion, and completion candidates supplied by CIDER should be displayed. After a short delay, popup documentation for the completed symbol should also be displayed.

About

[DEPRECATED] Emacs auto-complete backend for CIDER

Resources

Stars

Watchers

Forks

Packages

No packages published