问题描述
我正在尝试设置proto-repl原子编辑器程序包,显然它需要一个文件user.clj存在于某个地方-我猜这是leiningen的init文件.
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?
推荐答案
如果找到了文件,Clojure将从您的类路径中加载文件user.clj
.在默认的leinengen项目中,src/
将位于类路径上,因此,如果创建src/user.clj
,则该文件的内容将被加载到user
命名空间的上下文中.
Clojure will load the file user.clj
from your class path if it is found. In a default leinengen project src/
will be on the class path, so if you create src/user.clj
the contents of that file will be loaded in the context of the user
namespace.
user
是clojure repl的默认名称空间,但是一些leiningen项目将其覆盖.为了访问user.clj
中的定义,您将需要将user
拉入范围(使用require
或use
),或者确保user
是您的起始命名空间.
user
is the default namespace for the clojure repl, but some leiningen projects override this. In order to access definitions in user.clj
you will need to either pull user
into scope (using require
or use
) or make sure that user
is your starting namespace.
这篇关于文件user.clj应该放在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!