Fork me on GitHub
#spacemacs
<
2021-07-26
>
West14:07:13

https://youtu.be/_Wt4bhy_SFA I’ve got a problem where dir-locals doesn’t work.

practicalli-john14:07:38

Did you use revert-buffer to load the .dir-locals.el ??

West14:07:09

I did in fact.

practicalli-john14:07:17

I am still watchign the video 🙂

West14:07:20

though maybe my vid doesn’t show it

practicalli-john14:07:17

Process should be, create/edit the .dir-locals.el file, save it, jump to clojure buffer, revert clojure buffer and then run cider-jack-in

practicalli-john14:07:39

Newer versions of Cider are using the variable

cider-clojure-cli-aliases
Unless they have changed it back to global-optoins already 🙂

practicalli-john14:07:53

This is what I am using at my current project at work

((clojure-mode . ((cider-clojure-cli-aliases . ":env/develop:env/test"))))

West15:07:55

Alright, I’ll try this out.

West15:07:29

It works! Thank you so much!

practicalli-john15:07:20

You can also use SPC u SPC SPC cider-jack-in-cljs and the full jack-in command will show in the mini-buffer, allowing you to edit the command. It should be possible just to edit the last part of that command in the mini-buffer, adding your aliases to the start of -M:cider/nrepl So if you have an alias of :env/test to add a test path, then the last part of the command would be -M:env/test:cider/nrepl The main function is called from the cider/nrepl alias, so that must go last.

practicalli-john15:07:40

I should add that bit to my page on this subject (reminder to self) https://practical.li/spacemacs/clojure-projects/project-configuration.html