I've installed the Leiningen Clojure project tool using: brew install leiningen (the REPL works fine).

I wanted to use Vim to write some Clojure code and so I've installed the following plugins:

I opened three terminal consoles and execute commands in this order:

  1. lein new compojure my-project
  2. lein repl
  3. cd my-project && vim

Within Vim I first connect to the REPL...

  • :Connect nrepl://127.0.0.1:60356

...then I open the my-project/src/my_project/handler.clj file and press cpp (which I think is aliased to :Eval whilst my cursor is on the first character of the first opening parenthesis.

At this point I get the following error:

FileNotFoundException Could not locate my_project/handler__init.class or my_project/handler.clj on classpath: clojure.lang.RT.load (RT.java:443)

I've not been able to find any appropriate solutions?

有帮助吗?

解决方案

In order for lein to properly set up your classpath, it must be started inside the project directory. Change directory into the my-project directory before starting lein repl.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top