I am trying to setup proto-repl atom-editor package and apparently it needs a file user.clj to exist somewhere - which I guess is some leiningen's init file.
Where should I create this file?
I am trying to setup proto-repl atom-editor package and apparently it needs a file user.clj to exist somewhere - which I guess is some leiningen's init file.
Where should I create this file?
On
See the Proto REPL demo project https://github.com/jasongilman/proto-repl-demo/blob/master/dev/user.clj for an example of how to setup user.clj You should also add a dependency on clojure.tools.namespace in the project.clj https://github.com/jasongilman/proto-repl-demo/blob/master/project.clj
I just pushed some changes to Proto REPL last night to improve this area but you'll still benefit from having one setup.
On
According to the proto-repl page, it might use some functions from user namespace when reloading code in REPL (reset function) but it shouldn't be required.
You might want to take a look at the proto-repl demo project to see the more advanced setup.
Clojure will load the file
user.cljfrom your class path if it is found. In a default leinengen projectsrc/will be on the class path, so if you createsrc/user.cljthe contents of that file will be loaded in the context of theusernamespace.useris the default namespace for the clojure repl, but some leiningen projects override this. In order to access definitions inuser.cljyou will need to either pulluserinto scope (usingrequireoruse) or make sure thatuseris your starting namespace.