clojure-vim/clj-refactor.nvim

Support REPL commands on cljc and cljs files

Deraen opened this issue · 3 comments

Cljc should be easy by just modifying autocmd pattern: https://github.com/snoe/clj-refactor.nvim/blob/master/src/clj_refactor/main.cljs#L95

Cljs support might require some changes to connection logic.

snoe commented

So there's a couple options here:

  • Do the suggested fix but leave out any of the other functionality implemented by a proper repl client like fireplace (connection management, piggieback, namespace management).
  • Call back into nvim and use fireplace#message instead. But, after experimentation, I found that calling back to nvim locks the editor UI as the fireplace function is executed on the main thread.

I'm leaning towards using fireplace until a proper async client can be built. Some calls such as AddMissingLibspec do have multi second delays in large projects but I find that I generally wait for the edits to happen before continuing anyways. Any thoughts @Deraen ?

Async is nice but I agree that using Fireplace is probably best solution until proper async client is available (in Fireplace or elsewhere).

snoe commented

Added fireplace repl support in c5c6773 which removes the need for an autocmd.