@timofeytt You can run the main function with M-x cider-run, but that's not how you usually start servers with cider.
Well, actually, it's fine if your function is asyncronous
But if your function is synchronous I think it'll lock up the repl for you
A different way to do it (which I'm pretty sure is documented) is to add cider-nrepl to your project.clj. Then you can start your server normally and connect with M-x cider-connect
The command is pretty smart and should offer tab-completion for your server
As for your last question. Indeed, Cider doesn't take the liberty of calling functions for you after connecting. That's why there's a command for calling -main
a few messages ago I think @Malabarba meant to say "...addtools.nrepl to your project.clj"
And I probably shouldn't give instructions off the top of my head about stuff I last worked on over a year ago 🙄
@Malabarba Yes, it makes sense that it shouldn't automatically evaluate function definitions. You have basically described: 1) start a server and inject your REPL inside it. I see that the current chestnut project supports 2) starting REPL with project context and executing (run) or (go) to launch server. How do these things automagically work? Is it documented somewhere?
I mean the function definition is evaluated, but not called as expected.
@timofeyttrun and go is typically functions that are part of the 'reloaded workflow'
Anyway, you might have better luck in the #clojure channel on freenode or on slackchat, as this doesn't really have anything to do with emacs/cider
@timofeytt I've included links to the manual in my answer to your SO question
But I think I don't understand what you're asking now.
@Malabarba I was wondering where (run) and (cljs-repl) are defined, but now that I've found it inside generated code of the project. It's simpler that I thought. Thank you. P.S.: It's not my SO question.
Hey folks. CIDER used to render asynchronous errors from core.async in the nrepl-server buffer, now it doesn't. Am I missing something?
Sorry, my bad.
happy new year, everyone
i'm not sure if you're aware of this, but current build is broken. my spacemacs fails to download latest release from melpa
is there any way to have the buffer-overlay pretty-print?
No. You pretty-print to a popup, or insert a pretty-printed comment into the current buffer.
how would i do the latter?
cider-pprint-eval-last-sexp (C-c C-p) : Evaluate the form preceding point and pretty-print the result in a popup buffer. If invoked with a prefix argument, insert the result into the current buffer as a comment.
In other words, with the prefix argument would be C-u C-c C-p
Hey, can anyone help? I'm trying cider-test machinery for the first time, and cider-test-run-loaded-tests furiously opens all of my test files in Emacs. Can I prevent that?
Hi everyone, when I'm evaluating a piece of code from my project the resulting var gets put in the namespace where its defined. Is there any way to have it defined in the current repl namespace?
I was looking for cider-send-last-sexp-to-repl
Hi all. I recently upgraded cider after being a year or two stale in revision level (hey, it worked so well!). However the new emacs cider 0.16.0 revision has two problems for me. (1) Often the source code traversal is very slow when the nrepl is up. For example it can take seconds to start scrolling upward after jumping to end of file. (2) I thought perhaps things might be getter worse as my cider/repl session had been up for a while so was going to try to clear the whole cider buffer with C-c M-o, only the option to clear the buffer appears not to exist any more. Is there a way to do clear the whole cider buffer? I didn't find one after poking around for a bit.
Note that I'm talking about clojure source code traversal, not traversal of the nrepl buffer. I was only trying to clear that in case it was sucking computes as it has been known to do for large print representations and such.
testing testing, is this thing on?
You may get more responses in the Clojurians Slack, specifically the #cider channel. I happen to be working on a feature to avoid long lines of output in the repl (which would eliminate the slowdown problem) but in all my testing I have never seen excessive output lines in the repl affect interactions in other buffers.
The hangs occur specifically in the repl buffer itself.
Also yes, there is a way to clear the entire repl buffer, but I’m blanking on the exact command and it’s a holiday so I’m not at my laptop.
Hi, I hope you are well. I have a Clojure 6 month contract just come available in London up to £650 per day - please get intouch urgently if you are open to such a contract - firstname.lastname@example.org
Pressing c-h in Company completions says no docs are available, while using cider-doc works. Any idea why?