This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-26
Channels
- # announcements (1)
- # beginners (42)
- # biff (11)
- # calva (15)
- # cider (3)
- # clj-http-lite (3)
- # clojure (52)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (39)
- # clojure-uk (4)
- # clojurescript (52)
- # code-reviews (13)
- # conjure (1)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # emacs (6)
- # events (3)
- # graalvm (5)
- # hyperfiddle (7)
- # kaocha (14)
- # lsp (11)
- # malli (3)
- # nbb (13)
- # off-topic (87)
- # pathom (15)
- # polylith (23)
- # portal (5)
- # reitit (4)
- # shadow-cljs (110)
- # squint (114)
- # testing (1)
- # vim (13)
I'm looking for docs on setting up a clojure dev environment in a docker container on a remote host, and being able to access it from my local box. I've currently got an nrepl running in the container with the port exposed so I can connect my local emacs to it using cider-connect
(specifying the remote box and exposed port). the source is mounted in the docker container using --mount
so I can use tramp to edit the source on the remote box and have the changes visible inside the docker container. if I'm editing source in /ssh:remote:/path/to/src/foo.clj
, how do I tell cider to send the expressions to the remote cider repl session?
if there's a better/easier way I'd like to hear about it, this seems like it's kinda convoluted. I just want to be able to connect to a remote repl, edit code on the remote host, and evaluate forms remotely .... surely someone has figured out how to do this ... maybe?
got it sorted: running cider-connect
from the source dir links the two. also: https://docs.cider.mx/cider/usage/managing_connections.html#context-links
wrt cider
use-package
.dir-locals.el
cider-clojure-cli-aliases
and lazy loading (maybe not really a cider issue per se)
What is the correct way to set this up?
I noticed that sometimes when emacs loads .dir-locals.el
it complains about cider-clojure-cli-aliases
not being safe, but the defcustom
for that var specifies a :safe? 'stringp
predicate so it shouldn't warn on a value like ":dev"
Investigating this I notice that because of the lazy loading, when I open a clojure file, emacs hasn't yet loaded cider, doesn't (yet) know about cider-clojure-cli-aliases
and thus assumes it's unsafe. Once cider is loaded, if I then (somehow) retrigger the loading of .dir-locals.el
it will then load successfully without warning about safety.
I tried different values for the mode in the CAR of the .dir-locals.el
list but to no avail.
I suspect what is required is use-package
supporting some sort of auto/pre-load for customizable vars (like it does for commands with :commands
), but I wonder if there is something I am missing?
To be clear if I eager load clojure and cider mode all works well.
For reference here is my .dir-locals.el
((clojure-mode . ((cider-clojure-cli-aliases . ":sw1nn/dev:aws/sso:integrant/repl"))))