tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Boot build-tool #185

Closed mdiin closed 9 years ago

mdiin commented 9 years ago

I have been trying to get vim-fireplace to play nice with a clojurescript project and the boot build tool, without much success. I can get a working browser-repl connection going in the user namespace (i.e. a file outside of the src path), but once I switch to a file in the src-path, it switches namespace and seems to forget the browser connection.

I have looked at the definition of the Require function in plugin/fireplace.vim, I fail to see why it wouldn't work.

When running boot it is necessary to go around the :Piggieback command because it uses piggieback itself. To reproduce the above with boot:

  1. run boot watch cljs-repl cljs -usO none reload
  2. in vim, :Connect as usual
  3. in a file wher cqp shows the user namespace, execute (require '[adzerk.boot-cljs-repl :refer :all])
  4. in the same file, cqp and execute (start-repl)

Any idea where I should look to let vim-fireplace work with boot clojurescript repl is much appreciated.

tpope commented 9 years ago

I don't know the first thing about this boot task but I can tell you right off the bat you can't just "go around" :Piggieback. Is (start-repl) functionally equivalent to a piggieback invocation?

mdiin commented 9 years ago

Internally (start-repl) invokes piggieback, so I assume it is.

I will prepare a repo with a minimal example to reproduce the problem, hopefully later today, so I am not the only person able to produce this.

mdiin commented 9 years ago

I have set up a repository that contains the bare essentials of a Clojurescript project using boot at https://github.com/mdiin/fireplace-boot-example. It is necessary to have boot installed, there is a link for that in the README.

I will look more into this later.

mdiin commented 9 years ago

I have come to the conclusion that this is not something fireplace should take care of; it is the job of the boot task to return an environment usable by :Piggieback.

I am in the process of figuring out how best to make such a task.