Set the scope of the entries, using clojure-mode is usually preferable
Define the CIDER specific variables to use
CLOJURE-CLI-ALIASES
CLOJURE-BUILD-TOOL
which others are useful to add
global options has been replaced by aliases
Dont forget to revert the current buffer after editing the .dir-locals.el file to force Emacs to load that file.
Use C-u before cider-jack-in command to see the command before it is run (and edit if necessary)
Open the *messages* buffer to check the command that has been run.
Manually editing the command
The universal argument, C-u, (SPC-u for Spacemacs) before runnnig the jack-in command allows editing of the command
By default CIDER uses the :cider/nrepl alias, which must remain the last alias used in any chain of aliases (or CIDER wont start unless the last alias also included all the same libraries and middlware as the :cider/nrepl alias)
Useful aliases
:test - add test path so the cider test runner can find the test code on the class path, otherwise it will fail to find the tests (include the error if this path is not included.
:dev - add dev path to include a dev/user.clj file on the class path, allowing the REPL to be configured by loading the custom user namespace. Launch things like portal, a place to start stop components with IntegrantREPL, etc.
Raise a new question and refer to the old discussion (which can no longer be updated). This is the preferred way to manage content that is out of date on ClojureVerse.
Including aliases in
.dir-locals.el
Set the scope of the entries, using clojure-mode is usually preferable
Define the CIDER specific variables to use
Use
C-u
before cider-jack-in command to see the command before it is run (and edit if necessary)Open the
*messages*
buffer to check the command that has been run.Manually editing the command
The universal argument, C-u, (SPC-u for Spacemacs) before runnnig the jack-in command allows editing of the command
By default CIDER uses the
:cider/nrepl
alias, which must remain the last alias used in any chain of aliases (or CIDER wont start unless the last alias also included all the same libraries and middlware as the:cider/nrepl
alias)Useful aliases
:test
- addtest
path so the cider test runner can find the test code on the class path, otherwise it will fail to find the tests (include the error if this path is not included.:dev
- adddev
path to include adev/user.clj
file on the class path, allowing the REPL to be configured by loading the customuser
namespace. Launch things like portal, a place to start stop components with IntegrantREPL, etc.Update ClojureVerse discussion
As the configuration of CIDER has changed for the Clojure CLI, the original advice on https://clojureverse.org/t/how-to-setup-deps-edn-project-with-cider/6375/15 is out of date and can break cider
Raise a new question and refer to the old discussion (which can no longer be updated). This is the preferred way to manage content that is out of date on ClojureVerse.