Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:37
    stale[bot] closed #2736
  • 04:37
    stale[bot] commented #2736
  • 03:25
    EmmanuelOga commented #2745
  • 03:09
    EmmanuelOga commented #2745
  • Feb 22 20:29
    kolharsam commented #2805
  • Feb 22 15:42
    zendevil commented #2805
  • Feb 22 15:42
    zendevil commented #2805
  • Feb 22 13:13
    bbatsov labeled #2745
  • Feb 22 13:12
    bbatsov labeled #2745
  • Feb 22 13:12
    bbatsov unlabeled #2745
  • Feb 22 13:12
    stale[bot] unlabeled #2745
  • Feb 22 13:12
    bbatsov labeled #2745
  • Feb 22 13:12
    bbatsov labeled #2748
  • Feb 22 13:12
    bbatsov labeled #2748
  • Feb 22 13:12
    bbatsov labeled #2769
  • Feb 22 13:11
    bbatsov labeled #2770
  • Feb 22 13:11
    bbatsov commented #2805
  • Feb 22 12:42
    zendevil opened #2805
  • Feb 22 07:55
    bbatsov labeled #2783
  • Feb 22 07:55
    bbatsov labeled #2783
Neil Okamoto
@gonewest818
With C-c C-k that (defn -main ...) is evaluated but that’s not the same as evaluating -(main). Type (-main) at the repl and the webserver should start, is that right?
If you’re using component, however, you might want to look at this workflow instead. https://github.com/stuartsierra/component/blob/master/README.md#entry-points-for-development
Artur Malabarba
@Malabarba
@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
Artur Malabarba
@Malabarba
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
Neil Okamoto
@gonewest818
a few messages ago I think @Malabarba meant to say "...addtools.nrepl to your project.clj"
Artur Malabarba
@Malabarba
Probably :-)
And I probably shouldn't give instructions off the top of my head about stuff I last worked on over a year ago 🙄
Tim
@timofeytt
@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?
Tim
@timofeytt
I mean the function definition is evaluated, but not called as expected.
Lars Andersen
@expez
@timofeytt run and go is typically functions that are part of the 'reloaded workflow'
It goes with https://github.com/stuartsierra/component to manage starting and stopping the system/components
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
Artur Malabarba
@Malabarba
@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.
Tim
@timofeytt
@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.
Alexander Yakushev
@alexander-yakushev
Hey folks. CIDER used to render asynchronous errors from core.async in the nrepl-server buffer, now it doesn't. Am I missing something?
Alexander Yakushev
@alexander-yakushev
Sorry, my bad.
Adam Faraj
@adamfaraj
Anyone here?
feng lee
@87260280
@ShionAt 👍!
Lispre
@Lispre
happy new year, everyone
Dimitri Fedorov
@ai212983
i'm not sure if you're aware of this, but current build is broken. my spacemacs fails to download latest release from melpa
Shion
@ShionAt
Please allow me to show ShionKeys again
Alex Stokes
@ralexstokes
is there any way to have the buffer-overlay pretty-print?
Neil Okamoto
@gonewest818
No. You pretty-print to a popup, or insert a pretty-printed comment into the current buffer.
Alex Stokes
@ralexstokes
how would i do the latter?
Neil Okamoto
@gonewest818
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.
Alex Stokes
@ralexstokes
thanks!
Neil Okamoto
@gonewest818
In other words, with the prefix argument would be C-u C-c C-p
no problem!
Alexander Yakushev
@alexander-yakushev
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?
Aleksander Sumowski
@aleksandersumowski
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?
Aleksander Sumowski
@aleksandersumowski
I was looking for cider-send-last-sexp-to-repl
dtenny
@dtenny
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.
dtenny
@dtenny
testing testing, is this thing on?
Neil Okamoto
@gonewest818
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.
Sean Murphy
@SeanFullstack
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 - sean@fullstack.london
NightMachinary
@NightMachinary
Pressing c-h in Company completions says no docs are available, while using cider-doc works. Any idea why?
James Elliott
@brunchboy
Hmm. After the latest CIDER upgrade, trying to jack in fails with: Error loading refactor-nrepl.middleware: java.io.FileNotFoundException: Could not locate cider/nrepl/middleware/util/misc__init.class or cider/nrepl/middleware/util/misc.clj on classpath., compiling:(refactor_nrepl/middleware.clj:1:1) Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/private/var/folders/fg/1tzg0xt88v5bp20059blypr00000gq/T/form-init7039836408815040552.clj:1:9942)
Rob Culliton
@rcullito
is there a way to programmatically trigger a "return" keystroke via emacs lisp when using the nrepl in cider? I am inserting some text via a command in my .emacs config, and would like to submit it for evaluation automatically
Rob Culliton
@rcullito
ah cider-repl-return
C-h m worked quite well here. Rock on cider :thumbsup: