This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/lang/clojure/README.md

120 lines
3.3 KiB
Markdown
Raw Normal View History

2014-12-11 12:07:49 +00:00
# Clojure contribution layer for Spacemacs
2014-12-24 06:03:49 +00:00
![logo](img/clojure.png)
2014-12-11 12:07:49 +00:00
2014-12-12 00:43:03 +00:00
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**
- [Clojure contribution layer for Spacemacs](#clojure-contribution-layer-for-spacemacs)
- [Description](#description)
- [Packages Included](#packages-included)
- [Install](#install)
- [Layer](#layer)
- [Pretty Symbols](#pretty-symbols)
2014-12-12 00:43:03 +00:00
- [Cider](#cider)
- [Key Bindings](#key-bindings)
- [Documentation](#documentation)
- [Evaluation](#evaluation)
- [Goto](#goto)
- [REPL](#repl)
- [Tests](#tests)
2014-12-11 12:07:49 +00:00
2014-12-12 00:43:03 +00:00
<!-- markdown-toc end -->
2014-12-11 12:07:49 +00:00
2014-12-12 00:43:03 +00:00
## Description
2014-12-11 12:07:49 +00:00
This layer adds support for [Clojure][] language using [Cider][].
2014-12-11 12:07:49 +00:00
## Packages Included
2014-12-12 00:43:03 +00:00
- [Cider][]
- [clojure-mode][]
- [Clj Refactor][]
- [Cider Auto Complete][]
- [align-cljlet][]
2014-12-11 12:07:49 +00:00
## Install
### Layer
2014-12-11 12:07:49 +00:00
To use this contribution add it to your `~/.spacemacs`
```elisp
(setq-default dotspacemacs-configuration-layers '(clojure)
"List of contribution to load."
)
```
### Pretty Symbols
Pretty symbols for anonymous functions and set literals, like `(λ [a] (+ a 5))`, `ƒ(+ % 5)`, and `∈{2 4 6}`.
To enable this feature, add the following snippet to the dotspacemacs/config
section of your `~/.spacemacs` file:
```elisp
(setq clojure-enable-fancify-symbols t)
```
Or set this variable when loading the configuration layer:
```elisp
(setq-default dotspacemacs-configuration-layers '(
(clojure :variables
clojure-enable-fancify-symbols t))
"List of contribution to load."
)
```
2014-12-12 00:43:03 +00:00
### Cider
Cider requires nRepl middleware to function, please check the installation
instructions at the [cider repository][cider_install].
2014-12-11 12:07:49 +00:00
## Key Bindings
2014-12-12 00:43:03 +00:00
### Documentation
2014-12-11 12:07:49 +00:00
Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>SPC m d d</kbd> | cider doc
<kbd>SPC m d g</kbd> | cider grimoire
2014-12-11 12:07:49 +00:00
<kbd>SPC m d j</kbd> | cider javadoc
2014-12-12 00:43:03 +00:00
### Evaluation
Key Binding | Description
----------------------|------------------------------------------------------------
2014-12-11 12:07:49 +00:00
<kbd>SPC m e b</kbd> | eval buffer
<kbd>SPC m e r</kbd> | eval region
<kbd>SPC m e s</kbd> | eval last sexp
2014-12-12 00:43:03 +00:00
### Goto
Key Binding | Description
----------------------|------------------------------------------------------------
2014-12-11 12:07:49 +00:00
<kbd>SPC m g v</kbd> | goto var
<kbd>SPC m g e</kbd> | goto error
<kbd>SPC m g s</kbd> | goto symbol
2014-12-12 00:43:03 +00:00
### REPL
Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>SPC m j</kbd> | cider jack in
<kbd>SPC m k</kbd> | cider load-buffer
<kbd>SPC m z</kbd> | switch to repl
### Tests
Key Binding | Description
----------------------|------------------------------------------------------------
2014-12-11 12:07:49 +00:00
<kbd>SPC m t t</kbd> | run tests
2014-12-12 00:43:03 +00:00
[Clojure]: http://clojure.org
[Cider]: https://github.com/clojure-emacs/cider
[cider_install]: https://github.com/clojure-emacs/cider#installation
[clojure-mode]: https://github.com/clojure-emacs/clojure-mode
[Clj Refactor]: https://github.com/clojure-emacs/clj-refactor.el
[Cider Auto Complete]: https://github.com/clojure-emacs/ac-cider
[align-cljlet]: https://github.com/gstamp/align-cljlet