Fork me on GitHub

I think there’s no listing of the options anymore because now they are dynamic and they used to be fixed in the past. I’m not sure if defcustom has support for handling a dynamic list of options.


But it’s the issue you mentioned is certainly odd - like something to do with missing hack-variables or something (needed for dir-locals to work with non-file buffers).


I’d like to solicit a bit of feedback on updating piggieback for nREPL 0.4 from everyone. Please, take a look here and let me know how this looks to you. Some help with the mysterious error will also be appreciated!


I have a git repo with a deps.edn in a sub directory but no project files at the top level — is there any way I can run cider from that sub directory?


CIDER considers deps.edn to be a project root anyways.


Actually clojure-mode does this, but the end result is the same. 🙂


ahhh — I got confused because it asked me which command to use which made me think it couldn’t figure it out but it’s really just because the project has project.clj and deps.edn


Yeah, exactly. When there are several potential project targets we leave it to the users to decide what exactly to be used.


You’re welcome!


Good stuff. That new cider command is really nice 👍


I used to use “Eval & pretty print” quite often but noticed that this has been removed (I think?). I found the inspector thing - which is cool but requires me to know how to use it :D Is there any chance pretty printing will come back?


@martinklepsch It was never removed. 🙂


Just the keybindings changed recently, as there were many pprint-related commands and we moved them in a dedicated keymap, so people can find them easier.


(I just assume you’re refererring to C-c C-p which is not around anymore).


* **(Breaking)** Move `cider-pprint-eval-last-sexp`, previously on `C-c C-p`, to `C-c C-v (C-)f (C-)e` in the `cider-eval-commands-map`.
* **(Breaking)** Move `cider-pprint-eval-defun-at-point`, previously on `C-c C-f`, to `C-c C-v (C-)f (C-)d` in the `cider-eval-commands-map`.


Btw, I’m happy to report that I sorted out the piggieback situation and now 0.3.7 is out with support for nREPL 0.4. It will still work with the legacy tools.nrepl, so piggieback users won’t experience any issues if they are still using it.

❤️ 16

so now, aside from using piggieback 0.3.7, is there anything special that needs to be set up to have nREPL 0.4 in CIDER?


We just need to cut a stable 0.18 release and afterwards I’ll update the mainline middleware.


I’m playing with the idea to update the middleware straight in 0.18, but I’m not sure if I’ll have time and energy for this. 🙂


Generally now it’s very easy to get 0.4 going with clj or the lein nrepl, but lein repl requires you to be running lein from master. (and you have to use cider-nrepl-0.19-SNAPSHOT which I’ve build especially for early adopters).


If someone goes over all the cider-nrepl code and applies conditional requires like here we can have the support for 0.4 even now.


Pretty trivial, but that’s at least 1-2 hours boring manual work. 🙂


Probably doing things in this manner would be preferable to dropping support for tools.nrepl directly, though (which is what I did in the 0.19 branch).


Hi there, how can I evaluate just part of the function or one specific expression in comment? for example:

  (def server (-main "--port" "8080"))     ;; just this one
  (web/stop server))


@chokheli there are several ways. 1. put cursor at the end of the expression and press C-x C-e 2. there is an insert into the repl type of evaluation. There's a useful way to make things insert into the repl and eval automatically there which I like.

(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-after-insert-p nil)
The first of these makes forms put into the repl with the insert commands eval automatically rather than requiring you to hit enter. The second prevents the point from moving into the repl buffer. 3. You can redefine what top level defun means.
(setq cider-eval-toplevel-inside-comment-form t)
will make eval-ing top level defun aware of comment forms like this and make it do the right thing. If your point is inside the form, evaling (or inserting) into the repl using a top level defun command will work on what you mean and not the whole comment form which returns nil


The insert commands are nestled inside of a keymap at C-c C-j. There you'll find e for last expression, d for top-level-defun, r for region and one other one


if you want to see some more discussion and the code


Thank you Dan!


If you use cider-eval-toplevel-inside-comment-form there is a bug with autocompletion inside of comment forms at the moment. If you retoggle it off the bug goes away. There is a disagreement of what begginning-of-form means. I need to fix it

Drew Verlee22:07:39

i'm trying to get a nrepl connection via figwheel. im not sure what versions of what i should use at this point. for example, it seems like bozidar has done some awesome work and updated the whole setup, im not sure if changes need to be made to lein-figwheel to support this or not. more directly, with more current setup i get this error:

SEVERE: Unhandled REPL handler exception processing message {:op classpath, :session 066f0db1-77c8-42b8-bcc0-67610738112b, :id 9}
java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'nrepl.transport/Transport found for class:
its possible i should open a more formal github issue, but its not clear with who and about what.