문제

How do I get Clojure to load a project-specific .clj file on repl launch? I want to have some function available to me whenever I open up a new repl (I'm using nREPL on emacs, for what it's worth...)

Thanks

도움이 되었습니까?

해결책

Add an entry to your project.clj's :repl-options like the following

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

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

{
 :user
  {:repl-options {:init (load-file "path/to/file.clj")}}
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top