Giter Site home page Giter Site logo

ac-cider's Introduction

ac-cider

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

ac-cider’s goal is to eventually replace 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.

ac-cider's People

Contributors

alexander-yakushev avatar bbatsov avatar jakemcc avatar jeffwkm avatar juergenhoetzel avatar k2nr avatar killme2008 avatar llj098 avatar prepor avatar purcell avatar redraiment avatar youhavethewrong avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.