This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-30
Channels
- # announcements (1)
- # asami (60)
- # babashka (7)
- # beginners (19)
- # biff (5)
- # calva (12)
- # cherry (4)
- # cider (8)
- # clerk (3)
- # clojure-europe (3)
- # clojuredesign-podcast (2)
- # clojurescript (8)
- # data-science (48)
- # fulcro (8)
- # hyperfiddle (21)
- # leiningen (1)
- # malli (7)
- # music (3)
- # off-topic (7)
- # pedestal (15)
- # portal (8)
- # releases (2)
is there a template to start a basic project with cider dependencies and integrations all set up? I just want to start playing with the repl basically.
if it is just for playing you can open emacs, do a cider-jack-in and it can start and connect to a repl without any project. You can then create a .clj file or just put any buffer in clojure-mode and start playing with clojure
next step if you want to start creating a project and adding some dependencies you can :
$ mkdir my-project
$ cd my-project
$ echo '{:deps {hiccup/hiccup {:mvn/version "2.0.0-RC1"}}}' > deps.edn
then open that deps.edn file in emacs and do the cider-jack-in while on that file. It will start a repl but this time with those dependencies loadedalso if you have one of the latest clojure cli installed, instead of adding that dependency there you can create your deps.edn like this :
echo '{:deps {org.clojure/clojure {:mvn/version "1.12.0-alpha4"}}}' > deps.edn
and start a repl with that, and no other dependency.
That will start a repl with clojure 1.12 which has a nice feature to add libs on the fly, just by typing on your user ns :
user> (add-lib 'hiccup/hiccup {:mvn/version "2.0.0-RC1"})
or whatever library you want to play with, without restarting the replIf you look in the Emacs messages buffer after the jack-in command, you can see the full command that cider uses to start the REPL. Useful if you ever need to customise what command cider runs
For future reference, the simplest way to customise repl start up is via a .dir-locals.el
file, including aliases to run that provide additional tools
https://practical.li/spacemacs/clojure-development/project-configuration/