Fork me on GitHub
#cider
<
2018-07-30
>
bozhidar07:07:54

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.

bozhidar07:07:03

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).

bozhidar07:07:23

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

martinklepsch08:07:34

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?

bozhidar08:07:12

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

bozhidar08:07:35

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

martinklepsch08:07:58

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

martinklepsch08:07:13

Thanks @bozhidar 🙂

bozhidar08:07:51

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

bozhidar08:07:54

You’re welcome!

martinklepsch08:07:59

Good stuff. That new cider command is really nice :+1:

martinklepsch08:07:46

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?

bozhidar08:07:52

@martinklepsch It was never removed. 🙂

bozhidar08:07:23

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.

bozhidar08:07:44

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

bozhidar08:07:52

* **(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`.

bozhidar08:07:45

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.

manuel09:07:17

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?

bozhidar12:07:01

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

bozhidar12:07:53

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. 🙂

bozhidar12:07:03

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).

bozhidar12:07:14

If someone goes over all the cider-nrepl code and applies conditional requires like here https://github.com/nrepl/piggieback/commit/2f38ab2a7cf84061fc1a744c9a8e91660b3c3ac9#diff-748325368821931b8d3cdb2efc2a7586R19 we can have the support for 0.4 even now.

bozhidar12:07:47

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

bozhidar13:07:36

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).

chokheli18:07:40

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

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

dpsutton18:07:37

@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

dpsutton18:07:40

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

dpsutton18:07:17

if you want to see some more discussion and the code

chokheli18:07:17

Thank you Dan!

dpsutton18:07:11

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

drewverlee22: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: clojure.tools.nrepl.transport.FnTransport
its possible i should open a more formal github issue, but its not clear with who and about what.