Skip to content

Instantly share code, notes, and snippets.

@avitkauskas
Created June 23, 2023 21:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
How to connect to Biff nREPL using vim with vim-iced

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment