This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-17
Channels
- # ai (115)
- # announcements (8)
- # babashka (26)
- # beginners (7)
- # biff (8)
- # calva (1)
- # cider (10)
- # clerk (2)
- # clj-together (11)
- # clojure (26)
- # clojure-boston (1)
- # clojure-denmark (3)
- # clojure-europe (23)
- # clojure-nl (1)
- # clojure-norway (33)
- # clojure-uk (3)
- # clojurescript (14)
- # conjure (3)
- # cursive (65)
- # emacs (10)
- # events (18)
- # exercism (6)
- # honeysql (14)
- # hyperfiddle (11)
- # kaocha (6)
- # nbb (17)
- # off-topic (58)
- # pathom (5)
- # reagent (28)
- # reitit (1)
- # releases (1)
- # sci (3)
- # shadow-cljs (22)
- # xtdb (29)
I'm using cursive and Intellij and trying to setup a project using Clojure CLI, but I'm not finding how I can setup the nREPL from cursive to start on a specified namespace. On https://nrepl.org/nrepl/usage/server.html I couldn't find something similar as :init-ns
from Leiningen. Does anyone know how to do it?
Clojure CLI doesn't have such control.
But when clojure starts the REPL, it loads user namespace at the very beginning. Typical setup would be to create something like dev/user.clj
file with:
(ns user)
(require 'your.init.namespace)
(in-ns 'your.init.namespace)
Then you might want to add an alias in deps.edn:
:dev {:extra-paths ["dev"]}
Configure Cursive to use that alias for starting the REPLI tried this and din't work 😕. Not sure if I done something wrong but debugging de nREPL output the command that is executed is something like:
java -Dclojure.libfile=<path>.libs "<params-like-useragent>" clojure.main -i <path-to-private-var-folder>.clj
I was expecting something more like clj -M:nREPL -m nrepl.cmdline
(following the doc) or clj -M:dev
(following your instructions)
Interesting that I did not check the clojure.main execution but it appears on the commandodd, looks like your repl starts correctly but for some reason in-ns doesn't work
You may want to ask in the #C0744GXCJ channel.
I'll do that. Thanks for the suggestion