Fork me on GitHub
#cider
<
2016-08-10
>
echristopherson01:08:25

how do I make the current function's signature show up in a cljs repl?

echristopherson01:08:30

it does show up when editing cljs files

echristopherson01:08:52

also, it keeps wrongly setting clojure-mode for .cljs files: Something in your configuration activated `clojure-mode'

radon03:08:23

You’ll probably have to look through your Emacs config.

radon03:08:50

The correct mode should be set automatically, but your setup might be doing some kind of manual override.

pesterhazy10:08:26

When I run (cider-connect) it asks me to confirm the nrepl host/port (which I guess it gets from .nrepl-port)

pesterhazy10:08:45

in fact I always want to use the default choice (I press enter twice)

pesterhazy10:08:00

any way to get around those two keypresses?

pesterhazy10:08:56

hmm I don't see a reference to .nrepl-port

pesterhazy10:08:41

ah it's in nrepl-client.el

pesterhazy10:08:54

this is what I came up with:

pesterhazy10:08:56

(defun cider-force-connect ()
  (interactive)
  (cider--quit-connection (cider-current-connection))
  (cider-connect "localhost" (second (first (cider-locate-running-nrepl-ports)))))

pesterhazy10:08:05

elisp is fun 🙂

pesterhazy10:08:42

even better:

(defun cider-reset-dev ()
  (interactive)
  (when (not (cider-current-connection))
    (cider-connect "localhost" (second (first (cider-locate-running-nrepl-ports)))))
  (cider-eval-buffer)
  (cider-interactive-eval
   "(when-let [r (resolve 'my.project.repl/reset-dev)] (r))"))

danielcompton21:08:29

I’ve just started with Spacemacs, and I'm trying to jack in with cider. I get this error when I do: https://www.refheap.com/122096 Caused by: java.lang.SecurityException: Cannot locate policy or framework files! I have no issue launching repls in Cursive or lein in the terminal, and I get this on multiple projects, even after moving my profile.clj. Does anyone have any ideas?

danielcompton22:08:20

Seems to be related to refactor-nrepl and cider-nrepl

danielcompton22:08:33

This works:

lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.12\"\] -- repl
this doesn’t
lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.12\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.3.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.14.0-SNAPSHOT\"\] -- repl

danielcompton23:08:48

Looks like rolling back to a stable version of cider is probably the best course here