How to connect to Biff nREPL using Vim with vim-iced
If you use vim-iced in Vim and you have troubles connecting to Biff nREPL from your editor, try this:
Add nREPL middleware for vim-iced to your Biff project dependences (deps.edn):
;; deps.edn
{ ; ...
:deps { ; ...
com.github.liquidz/iced-nrepl {:mvn/version "1.2.480"}}}
Add a middware wrapper iced.nrepl/wrap-iced
to your Biff config clj-args
--middleware
(config.edn):
;; config.edn
{ ; ...
:tasks { ; ...
:biff.tasks/clj-args [ ; ...
"--middleware" "[iced.nrepl/wrap-iced,cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"}}
Start your app with bb dev
and check that nREPL was successfully started - look for the line
nREPL server started on port 7888 on host localhost - nrepl://localhost:7888
Now you should be able to connect to nREPL from Vim with an :IcedConnect
command
(maped to <Leader>'
in default vim-iced key bindings).