cider 2024-09-10

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?

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

That was it 🙏 , thank you @vemv.

1

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?

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

👍 2

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

✅ 1

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

1