Fork me on GitHub
#cider
<
2018-12-28
>
ahungry03:12:00

is there a cider option to keep the REPL ns synced with the current clojure buffer ns?

vemv03:12:44

I have such a fn, but it got reeeeeeeally custom so it's not worth sharing but it should be pretty easy, and a good excuse to learn about Elisp hacking if you're still in that stage!

ahungry03:12:53

thanks, I do enjoy a bit of elisp hacking 🙂

🙌 4
dpsutton03:12:31

not that i know of. do you know the shortcut to load the buffer and set the ns though? (`C-u C-c M-z`)

ahungry03:12:20

nice, thank you

dpsutton03:12:54

that's built into my muscle memory and i use it the way you are asking

ahungry03:12:16

Wow, this is basically perfect! pressing the prefix is a little annoying (I use evil + evil-leader ,so for me its ; u followed by a gz. I guess I could advice cider-switch-to-repl-buffer or just write a wrapper function for it so I only ever need to hit gz to flip/flop

ahungry03:12:57

Ok, another one to fire off - is there a convenient way to enable pop up (ac-cider) doc help in the clojure mode buffers, not just in the cider repl? So that when I type, (map in a clojure buffer, I get the ac candidates with the popup.el help tooltip, as I do in the repl? (I know company supersedes ac-cider, but ac-cider still works perfect in the repl and company stated on github they will never support terminal based popup hover tips)

dpsutton03:12:44

advice gets spooky. should be trivial to write a function that calls

(defun my-thing ()
  (interactive)
  (cider-load-buffer)
  (cider-repl-set-ns (cider-current-ns)))

dpsutton03:12:06

I have no idea how ac-cider works sorry

ahungry03:12:59

thanks again x2

ahungry03:12:16

I should have researched into my own init a bit more, I was just misisng a mode hook

ahungry03:12:22

(that I had on cider repl hook)

cider 4
ahungry03:12:29

(defun my-cider-ac-hooks ()
           (auto-complete-mode 1)
           (ac-flyspell-workaround)
           (ac-cider-setup))

+        (add-hook 'clojure-mode-hook 'my-cider-ac-hooks)

pablore16:12:32

Anyone knows what this error means?

[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.5.3\"\] -- update-in :plugins conj \[com.billpiel/sayid\ \"0.0.17\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.19.0-SNAPSHOT\"\] -- with-profile +dev repl...
[nREPL] server started on 56326
[nREPL] Establishing direct connection to localhost:56326 ...
[nREPL] Direct connection to localhost:56326 established
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op clone id 1)
error in process filter: Sync nREPL request timed out (op clone id 1)
This happens when doing cider-jack-in on a project

pablore16:12:04

further tries give the error:

user-error: 'cider-jack-in' requires the nREPL op "classpath" (provided by cider-nrepl)

bozhidar16:12:23

@pablore It means that probably something blew up while the server was starting. I guess the actual error is not visible in the message you’ve pasted here.

bozhidar16:12:48

You can try running the command in the shell to see what happens when you run it.

bozhidar16:12:44

You should also check out the instructions here https://www.cider.mx/en/latest/troubleshooting/

pablore17:12:52

yep, it’s blowing up when doing lein repl too:

Exception in thread "main" Syntax error compiling at (/private/var/folders/q9/7v8dcy694bj2mc9cykfm8gn00000gn/T/form-init5200111103923137134.clj:1:11480).

pablore17:12:17

I don’t know why is it compiling some obscure clj file in /private

bozhidar17:12:48

That’s a temp storage for code evaluated in the REPL. Check your project’s configuration (and your profiles) it must be something wrong there. If lein repl doesn’t work properly, the problem is not CIDER-related.

ahungry21:12:25

Can cider-doc auto complete from the company or ac-cider completions list at all?