This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-29
Channels
- # aws (3)
- # beginners (160)
- # boot (2)
- # bristol-clojurians (3)
- # cider (62)
- # cljs-dev (77)
- # cljsrn (15)
- # clojure (147)
- # clojure-brasil (10)
- # clojure-dusseldorf (2)
- # clojure-gamedev (1)
- # clojure-italy (128)
- # clojure-russia (1)
- # clojure-spec (19)
- # clojure-uk (34)
- # clojurescript (408)
- # code-reviews (2)
- # component (1)
- # core-async (56)
- # cursive (1)
- # datascript (1)
- # datomic (81)
- # emacs (11)
- # fulcro (39)
- # java (16)
- # jobs (3)
- # lein-figwheel (2)
- # leiningen (6)
- # lumo (89)
- # off-topic (11)
- # om (2)
- # om-next (1)
- # onyx (17)
- # parinfer (4)
- # pedestal (3)
- # perun (1)
- # quil (3)
- # re-frame (19)
- # reagent (8)
- # reitit (5)
- # remote-jobs (5)
- # shadow-cljs (145)
- # spacemacs (1)
- # sql (7)
- # test-check (15)
- # uncomplicate (1)
- # unrepl (122)
- # vim (2)
- # yada (4)
According to https://cider.readthedocs.io/en/latest/interactive_programming/ there are two cider functions both called cider-eval-defun-at-point
but with different keyboard shortcuts and a different explanation for their functionality. I assume this is a doc error?
One of them does a "walk through its evaluation" and the other doesn't -- what does "walk through its evaluation" mean?
@ajs No, that’s not a mistake - one function that does different things with and without a prefix argument. Perhaps we should merge the two descriptions, though.
I’m building an extension for Clojure support in VS Code, using cider-nrepl. Is there a place where the various op
s are documented? Right now I’m trying to figure out if there is a way to switch namespace without evaluating something like (in-ns 'foo.bar)
. But generally I find I am often in the wrong project digging around in the code.
I have done a little documentation in replant: https://github.com/SevereOverfl0w/vim-replant/blob/master/docs/CIDER.adoc
@kingmob thinking if you override the source dirs for the repl profile to exclude your test dirs, would perhaps do the trick
@dominicm: Many thanks! How complete do you think that is? It seems quite tiny. And I don’t see eval
or pprint
there. (I’m still hoping there is an op for switching namespace 😄)
I didn’t build the connector in the extension, so not very familiar with how it works. But looking at it it seems that it sends all ops over the same socket. I wonder how it is determined which op
gets handled where…
@bozhidar I was unclear, enforcing that people adding new features must write extensive documentation is more friction.
I’m not sure there is that very much needed. Once you find the right source files most things are pretty easy to understand. Speaking for myself, what I would benefit from is some kind of overview, a guide, a hand to hold while exploring. I’m pretty new to the whole Clojure world, as well as Emacs and would benefit from something that shows how the toolings fit together. And some pointers: “If you want to do this, look here.”
I'm trying out Cider again after about 4 years 😄. I'm trying to migrate over my workflow from Cursive. The main keybinding I'm missing is "send-top-level-form-to-repl". What's the cider function to do this
preferably the command would ignore comments, so
(comment
(+ 1 2)
)
Wouldn't send over (comment ...)
but send over (+ 1 2).I found some cider commands that do this, but they seem to either be in-line or in the minibuffer, neither of which I prefer
@dominicm Yeah, of course. I was mostly referring to forcing myself to documenting the ops. 🙂 Something I should probably started doing at the very beginning.
@tbaldridge Let me look that up. We have a few send to REPL commands.
So, we’ve got cider-insert-defun-in-repl
(`defun` -> top-level-form
), but it’s not bound to any key, and it’s not mentioned in the menus as well. Another failure of mine. 😄
I was going to remap it anyways so that's fine
I prefer C-` for this sort of thing, thanks!
and will that ignore (comment ...) ?
if not it's no big deal, but it would be nice
It doesn’t do anything fancy with comment
, though. I rarely use it, so it never crossed my mind to drop it something like this. Obviously doing this won’t be hard. 🙂
Please, file a ticket about it and me or someone else from our team will take a look at this.
P.S. Nice to see you back in Emacs-land! I hope you’ll like the progress we’ve made over the past 4 years. 🙂
Interestingly it does work, although I get an additional prompt: "No comment syntax is defined. Use: "
If I hit enter it ignores the comment and inserts the top level form I'm hovering over.
> Interestingly it does work, although I get an additional prompt: “No comment syntax is defined. Use: ”
That’s odd. Doesn’t happen when I try it. Such an error must be some unexpected interaction with clojure-mode
. You might want to file a ticket about this problem as well.
yeah it was, clojure-mode was off so it grabbed from the start of the line
@bozhidar talking 'bout top level forms, I have an elisp function that brings the cursor at the top of the file but after the first sexp so that I can evaluate it (inf-clojure of course). Useful for evaluating the ns form with two key bindings. Is there a better way?
clojure-mode
already has a function that returns the ns form - I’d simply use it and pass the result to the REPL for evaluation.
Uhm interesting. Yeah well that is an option I haven't considered. Cool thanks
@bozhidar ok I thought the ns
form was returned, clojure-find-ns
only actually finds the symbol of the ns
form
my case is a bit more involved as I want to evaluate the first form of a file (typically the ns form)
kk cool I was asking because it might be a nice addition to clojure-mode
(maybe)
@tbaldridge The interesting point of your story is why you are migrating back to Emacs from cursive? Seems that most people go the other way, and I also was thinking of moving over to cursive, so would enjoy your perspective
@ajs, I more said I was thinking about it
my team uses emacs, so I was trying it out
So very frequently when using the CIDER REPL, it freezes my Emacs for anywhere from 10 seconds to infinity. This last freeze left me losing a few hours of work. Not even pkill -SIGUSR2 emacs
would unfreeze it. I managed to capture this with the Emacs profiler: https://files.lispcoder.net/images/screenshots/img-20180327102725.png
Can you save the profiler buffer and upload as an attachment? Also open an issue against CIDER if you can.