I'm beginning my learning in clojure and a hard part of this has been work with libraries and dependencies...I've worked with javascript and ruby and they have rubygems and npm..really simple...now I'm trying use leiningen..I've installed this, I use emacs and install elein too...I can create a project, handle the libraries and dependencies and work fine..but I can't use the repl and my slime "evaluate expression and evaluate region" don't work...I'm really newbie with slime and clojure mode..and more newbie with leiningen and I don't know how is the workflow...
I set my libraries inside project, my main namespace and invoke "elein-deps" or "elein-install"
I wrote my code and run it using "elein-run"...it run fine
but how can I use the repl..are there a automated way for load the leiningen repl or do I need import my files and namespace inside my repl (sorry but I'm newbie with clojure and I'm not used to the way load files and namespaces with it...I must use "load-file" and the full path to my file...or must I use "use"??)
please if can explain me how is the workflow with leiningen inside clojure I would appreciate it..many thanks!!
You need to use 'require' or 'use' to load your code into environment. Leiningen has support for evaluation of code during REPL initialization, the file with code is specified using ':repl-init-script' option. This file will also evaluated during swank's load...
P.S. you can also look onto ':repl-init' option - it will load given namespace and switch to it...
P.P.S. you can also use M-x clojure-jack-in from fresh clojure mode, to bootstrap swank, run 'lein swank' & connect to swank's REPL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With