How can I get Clojure to load a project .clj file for a project when running REPL?

How do I get Clojure to load a .clj file project when I run repl? I want some features to be available to me whenever I open a new replica (I use nREPL on emacs, for what it's worth ...)

thanks

+4
source share
1 answer

Add an entry to your project.clj :repl-options , as shown below.

 :repl-options {:init (load-file "src/your-project-specific-file.clj") } 

If you want your functions to be available in all your REPLs, add an entry to the user profile in .lein/profiles.clj as follows:

 { :user {:repl-options {:init (load-file "path/to/file.clj")}} } 
+6
source

Source: https://habr.com/ru/post/1497583/


All Articles