cider

Patrick Winter 2024-09-10T16:59:44.177199Z

I am trying to start nREPL with a bunch of middlewares (e.g. Portal.) and rebel readline (that's why can't use --middleware in deps.edn).

(ns repl
  (:require [nrepl.server :as nrepl.server]
            [cider.nrepl :as cider.nrepl]))

(def nrepl-middlewares (map #'cider.nrepl/resolve-or-fail cider.nrepl/cider-middleware))

(nrepl.server/start-server
   :port 8889
   :handler (nrepl.server/default-handler nrepl-middlewares))
When specfying the cider middlewares I get the following warning. Any idea what I am doing wrong here?

Patrick Winter 2024-09-10T17:01:08.278069Z

vemv 2024-09-10T17:12:48.135859Z

The original uses apply could it be that?

(def cider-nrepl-handler
  "CIDER's nREPL handler."
  (apply nrepl-server/default-handler (map resolve-or-fail mw/cider-middleware)))

Patrick Winter 2024-09-10T17:27:27.424749Z

That was it 🙏 , thank you @vemv.

1
James Doughty 2024-09-10T18:50:56.876569Z

When I try to run cider-jack-in I get an error saying The lein executable isn't on your 'exec-path' , even though I can run lein commands from the emacs-terminal. Have I done something wrong?

oyakushev 2024-09-10T18:56:08.931009Z

Can you M-x customize-variable cider-lein-command and set a full path there?

👍 2
vemv 2024-09-10T19:07:13.945379Z

https://github.com/purcell/exec-path-from-shell is a popular solution for that kind of thing

✅ 1
James Doughty 2024-09-11T15:26:09.501569Z

The exec-path-from-shell plugin fixed the problem. Thank you both!

1