I have been using Clojure, ClojureScript, lein, shadow-cljs, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project.
There is the main repository, let's call it principal. And also a supporting repository, called supporting.
Ok. On my local ~/projects
folder, I have ~/projects/principal/
and also ~/projects/supporting
.
At some point, after building the project being on ~/projects/principal/
, I am using the ClojureScript REPL to invoke a function from one of the dependencies, the supporting repository:
cljs.user> (supporting.core/my-function my-variable)
With the cursor on top of supporting.core/my-function
I execute the command cider-find-var
(bounded to M-.
) . This is a cool command. It allows me to jump to see the definition of the function!
The only problem is where CIDER is pointing me:
Directory /Users/pedro/.m2/repository/supporting/1.2.15/
As you can see, it does not point to the "original source code" of the supporting repo. It actually points to the "compiled version" related to Maven (the output of lein install
, if my understanding is correct).
But, as far as I know, it is not appropriate to edit this. I need to edit the original file pre-compile on a different folder.
How to make CIDER jump to the original editable pre-compiled repository?