diff options
Diffstat (limited to 'doc/installation.md')
-rw-r--r-- | doc/installation.md | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/doc/installation.md b/doc/installation.md index 69338553..6972933f 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -1,30 +1,41 @@ -## CIDER's nREPL middleware +## CIDER's nREPL Middleware -Much of CIDER's functionality depends on the presence of CIDER's own -[nREPL +Much of CIDER's functionality depends on its own [nREPL middleware](https://github.com/clojure-emacs/cider-nrepl). Starting -with version 0.11, When `cider-jack-in` (<kbd>C-c C-x (C-)j (C-)j</kbd>) is used, -CIDER takes care of injecting it and its other dependencies. +with version 0.11, `cider-jack-in` (<kbd>C-c C-x (C-)j (C-)j</kbd>) +automatically injects this middle and other dependencies as required. -**`profiles.clj` or `profile.boot` don't need to be modified anymore for the above use case!** +!!! Note + In the past, if you were setting up CIDER, you might have had to + modify `profiles.clj` or `profile.boot`. CIDER now handles + everything automatically and you don't need to add anything + special to these files. -If you don't want `cider-jack-in` to inject dependencies automatically, set -`cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup -the dependencies yourself (see the section below), just as in CIDER 0.10 and older. +!!! Tip + + If you don't want `cider-jack-in` to inject dependencies automatically, set + `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup + the dependencies yourself (see the section below), just as in CIDER 0.10 and older. CIDER can also inject a Clojure dependency into your project, which is useful, for example, if your project defaults to an older version of Clojure than that supported by the CIDER middleware. Set `cider-jack-in-auto-inject-clojure` appropriately to enable this. -If a standalone REPL is preferred, you need to invoke `cider-connect` (instead -of `cider-jack-in`) and you'll need to manually add the dependencies to your -Clojure project (explained in the following section). +If you prefer a standalone REPL, you will need to invoke +`cider-connect` instead of `cider-jack-in` and manually add the +dependencies to your Clojure project (explained in the following +section). -### Setting up a standalone REPL +### Setting Up a Standalone REPL #### Using Leiningen +!!! Note + + It's highly recommended to use Leiningen 2.8.3 or newer, as 2.8.3 is the first + release to ship with nREPL 0.5. + Use the convenient plugin for defaults, either in your project's `project.clj` file or in the :repl profile in `~/.lein/profiles.clj`. @@ -35,7 +46,7 @@ Use the convenient plugin for defaults, either in your project's A minimal `profiles.clj` for CIDER would be: ```clojure -{:repl {:plugins [[cider/cider-nrepl "0.18.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.19.0"]]}} ``` !!! warning @@ -46,6 +57,11 @@ A minimal `profiles.clj` for CIDER would be: #### Using Boot +!!! Note + + It's highly recommended to use Boot 2.8.2 or newer, as 2.8.2 is the first + release to ship with nREPL 0.4. + Boot users can configure the tool to include the middleware automatically in all of their projects using a `~/.boot/profile.boot` file like so: @@ -53,7 +69,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.18.0"]]) + concat '[[cider/cider-nrepl "0.19.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -61,9 +77,9 @@ all of their projects using a `~/.boot/profile.boot` file like so: For more information visit [boot-clj wiki](https://github.com/boot-clj/boot/wiki/Cider-REPL). -### Using embedded nREPL server +### Using Embedded nREPL Server -If you're embedding nREPL in your application you'll have to start the +If you're embedding nREPL in your application, you'll have to start the server with CIDER's own nREPL handler. ```clojure @@ -80,8 +96,11 @@ It goes without saying that your project should depend on `cider-nrepl`. !!! note - `x.y.z` should be compatible with the version of CIDER you're currently using. - The required version can be checked in `cider-required-middleware-version`. Prior to CIDER 0.18, CIDER and cider-nrepl were always released together - and their versions had to match for things to work, but as the prominence - of cider-nrepl grew and many other tools started using, this was changed. + and their versions had to match for things to work. But as the prominence + of cider-nrepl grew and many other tools started using it, the two + projects evolved separately and are no longer in tight + lock-step. Any recent version of cider-nrepl should be compatible + with a recent version of CIDER. You can check the required version + of cider-nrepl for your version of CIDER by looking at + `cider-required-middleware-version`. |