Skip to content

Instantly share code, notes, and snippets.

@avitkauskas
Last active February 19, 2024 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avitkauskas/88ddc3c9b297f431143e22f36a224459 to your computer and use it in GitHub Desktop.
Save avitkauskas/88ddc3c9b297f431143e22f36a224459 to your computer and use it in GitHub Desktop.
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 middleware 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