Fork me on GitHub
#cider
<
2018-03-28
>
bozhidar04:03:01

@mitchelkuijpers Happy to hear this, although I believe we’re just getting started with it. 🙂

doglooksgood06:03:09

is there a main ns for cider-nrepl so that people who use cider middlewares and tools.deps and easily setup :cider alias with -m.

dominicm06:03:40

It works with tools.deps, yep

dominicm06:03:26

There's an init function in clojure.main

doglooksgood06:03:03

some people may not start repl in emacs. but still want the benefit of cider-nrepl.

dominicm09:03:51

sorry, I meant, the init function in cider.main

dominicm09:03:58

vim-jack-in uses it to start an cider-nrepl

looveh08:03:00

Does cider have support for a) jumping to the definition of a var, and b) refactoring a var in ClojureScript?

benedek08:03:46

a) yes, M-.

benedek08:03:40

b) not 100% sure what you mean if renaming a var then clj-refactor does for jvm clojure not for cljs unfortunately

sw1nn10:03:26

Morning all. Is clojure-cli project type ready for use? I just tried and am getting 'are you sure you want to connect without a project'. clj -r works at the command line.

dominicm10:03:16

@sw1nn You need to use cider 0.17 (snapshots)

sw1nn10:03:32

yes I'm using latest from melpa

dominicm10:03:32

I don't know emacs well, is melpa only stables? I thought there was a separate for unstables.

dominicm10:03:52

okay, apparently melpa is implicitly unstable.

sw1nn10:03:04

there's melpa-stable

bozhidar10:03:08

@sw1nn That’s just a warning, that you can turn off with a configuration flag.

bozhidar10:03:09

Probably we’ll disable it completely at some point for clojure-cli, as people would normally use this outside a project I guess.

bozhidar10:03:57

With lein, boot and gradle running jack-in outside of a project generally doesn’t make much sense, therefore this warning.

sw1nn11:03:08

It seems that you have to cider-jack-in from the dir with deps.edn, whereas with lein it would search up to find project.clj

sw1nn11:03:16

does that sound right?

sw1nn11:03:36

haven't used cider for a while 🙂

bozhidar11:03:42

More or less.

bozhidar11:03:09

If you’re outside a directory with any project marker file it will also start clojure right now.

sw1nn11:03:24

ok, thanks for the info

bozhidar11:03:24

Let me know if you need any help with this. Unfortunately I never found the time to properly polish this, but I hope this will change soon (or someone else will help with it). But at least we have something working even now. 🙂

sw1nn11:03:22

I think it would be reasonable to search up the dir tree for deps.edn in the same way that lein connections do?

bozhidar11:03:42

Yeah, that’s how it behaves right now.

bozhidar11:03:22

But the different behavior for running it outside of a project is mostly there to serve the usecase of someone needing a quick repl to play with Clojure in general.

bozhidar11:03:22

As you can see here, the code for lein and tools.deps is pretty much the same https://github.com/clojure-emacs/cider/blob/master/cider.el#L1002

ajs11:03:42

Having trouble finding a way to specify which project.clj profile jack-in should use. Is there a way?

bozhidar12:03:17

You can customize the lein params in some .dir-locals.el file.

bozhidar12:03:38

That’d be the approach I’d take.

bozhidar12:03:50

See cider-lein-parameters.

bozhidar12:03:49

One more thing I forgot - if you run cider-jack-in with a prefix C-u the command will prompt you for the project you want to jack into and the params for the jack-in command.

bozhidar12:03:00

Perhaps that’d be easier for you.

ajs13:03:05

Thanks, what is the syntax for those jack in params if you just want to specify a profile?

dpsutton13:03:34

((nil . ((cider-lein-global-options . "with-profile dev")
         )))

dpsutton13:03:37

in .dir-locals.el

bozhidar13:03:21

I’d have put those in parameters, not global options, as it was intended for something else, but I guess in practice this doesn’t matter much.

bozhidar13:03:23

I’m not even sure why we have them separated. @benedek came up with separation and it made sense to me, but I can see how it can be confusing. Go figure what’s a param and what’s a global option (think of things like -v).

benedek14:03:35

was that me? perhaps I was following lein cli documentations...?!

benedek14:03:51

don't really recall tbh

dpsutton15:03:06

cider-lein-parameters is "repl :headless :host ::" so its important not to blow those away. lein global options is nil and you can just clobber as your heart desires

bozhidar15:03:42

Yeah, I know. But I really think that we should probably just have one command string per build tool and have people have to think only about it.

kingmob17:03:44

Is there a way to get clj-refactor’s middleware to ignore test directories on jack-in? (We have an older test code base, and when the clj-refactor/nrepl middleware builds the AST, it evals the forms, which runs the integration tests, and slows things down.)

escherize21:03:14

Anyone having luck using clj with refactor-nrepl?

escherize21:03:08

I tried this, but it's not quite right yet:

escherize21:03:24

clojure -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} cider/orchard {:mvn/version "0.1.0-SNAPSHOT"} cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"} refactor-nrepl {:mvn/version "2.3.1"}}}' -e '(require (quote cider-nrepl.main)) (require (quote refactor-nrepl.middleware)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware" "refactor-nrepl.middleware/wrap-refactor"])'

dominicm00:03:41

Use the snapshot of refactor

dominicm00:03:49

2.4.0-SNAPSHOT