tpope / vim-salve

salve.vim: static support for Leiningen and Boot
195 stars 14 forks source link

Starts a `Console!` when using checkouts despite using fireplace's Connect already #3

Closed RyanMcG closed 10 years ago

RyanMcG commented 10 years ago

I had trouble coming up with a succinct title for this issue, so it may be useless/misleading :)

The setup I would like to support involves a leiningen project with a checkouts folder.

Project A has a dependency on B of course.

When editing ./checkouts/B/src/B/b.clj and I use cpr (before or after connecting to an nREPL started by a process in A) I believe Console! is invoked. A new tmux window opens up with the result of lein repl in project B in it.

I get the expected behaviour by disabling this plugin (i.e. not putting it on rtp).

Is there some way to support using checkouts with this plugin? Why does the fireplace connection I set manually get dropped?

I'd be more than happy to post a PR given some direction.

tpope commented 10 years ago

Is there anything special about this checkouts directory or the projects within? Or is it just a directory of other leiningen projects?

RyanMcG commented 10 years ago

https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies

It is a normal directory with (at least typically) symlinks to other projects.

tpope commented 10 years ago

I think the best we could do would be an option to disable the automatic console entirely. With symlinks in the mix, there's no real way to even tell we're in a checkout, so there's not much we can really do on the leiningen.vim side.

On the fireplace.vim side, you could maybe make the autoconnect less aggressive, but this is hard to do while still transparently handling repl restarts.

RyanMcG commented 10 years ago

I think we can/should avoid modifying fireplace. Defining some option to disable/enable the automatic console sounds good to me. I'll take any pointers you have on how to do this.

RyanMcG commented 10 years ago

4c06ab9 works like a charm. Thanks! Your vim plugins are awesome!