Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some way to automate connections to nREPL from Vim Fireplace?

Tags:

vim

clojure

nrepl

I'm running lein repl in a project, and it successfully starts up and creates the file target/repl-port.

Using VIM version 7.4.86 I can use a command like:

:Connect nrepl://localhost:57644

Vim then successfully connects to the repl, and all is good.

However, my understanding is that vim-fireplace is able to make this connection all by itself using the target/repl-port file. That is not happening. I did see a comment about lein 2.3 changing to use target/repl/repl-port (I use lein 2.0.0 for this project - a requirement that is out of my control) so I tried to creating a symlink at this location, but that isn't picked up either.

I'm using the version of vim-fireplace from: github.com/tpope/vim-fireplace

at the latest commit, which is currently:

f1b8096b3fe00cd9594c8a2bf0819efc154e9843
(Date:   Wed Oct 23 21:25:53 2013 -0700)

I'm hoping to automate this connection. I'm not big on VIMscript, so I was hoping that there might be some way to track down the issue without having to delve into the sources.

like image 784
PaulaG Avatar asked Nov 01 '22 10:11

PaulaG


1 Answers

struggled a little bit with that too.

  1. Start lein repl in your project directory
  2. Start vim any-clojure-file.clj also in your project directory

Then it should connect automatically.

Fireplace only connects automatically, when you open a clojure file.

best regards

adrian

like image 128
addisaden Avatar answered Nov 15 '22 07:11

addisaden