Fork me on GitHub

hello, can someone help me figure how do I write a Java class and import it using Cursive? this may not be a cursive specific issue, but I wonder if Cursive can help in some way. I was expecting to be able to just write a class along with the clojure namespaces, but when I try to import it, it is like the class doesn't exists


I posted on #clojure before, if someone please can give me some light

Jakub Holý (HolyJak)17:07:30

What is common and worked for me was to have Java under another root folder. You just need to configure lein/... for it.


thanks, I guess whats making my life harder is that I'm using deps.edn, but I got some help yesterday and made it work, there are more details in the #clojure discussion, thanks for the lein hint


Using the cursive-started nrepl, is it possible to configure additional middleware. In particular, piggieback?


@dominicm Not yet, but it will be very shortly.


@cfleming I should probably have mentioned "deps.edn" at the same time 😄 Will this new feature support some kind of "injection". Would it be possible for aspiring cursive-compatible templates to place a file somewhere (in .idea or something) that will instruct cursive on what middleware and dependencies to inject?


Umm, maybe - I haven’t gone far enough down the rabbit hole yet to know that, but I’ll keep that use case in mind.


Currently Cursive injects nREPL itself, and for piggieback it probably makes sense to bundle and inject a compatible version.


I’ll also shortly be adding dual clj/cljs REPLs to make all this easier.


That would be good too. One drawback is that currently piggieback blows up if cljs isn't present (due to a tools.reader thing)


Ugh, that sucks.


Although, cursive knows if it's a cljs project.


I don’t want to bundle cljs


I think it can be worked around with some dynamism, but I haven't tried yet.


Maybe if I work on that, it'll make it easier for you to bundle 🙂


Cursive does include Maven download functionality, so perhaps the best option is not bundle at all and download specified versions as required.


Cursive analyzes the whole deps tree doesn't it?


I can check if CLJS is on the classpath, yes, if that’s what you mean.


Basically, yeah. But you know that before starting nrepl. Would that be a good way to determine whether to include piggieback?


It would certainly be a good cue to suggest it, yes.


I’m planning to try to figure out how best to handle CLJS in all its REPL forms next week. Apart from the technical challenges, it’s a fearsome UI problem.


Does piggieback blow up without cljs in cursive or in general? Ive been wanting to get in there and that would be a great first issue


in general.


@dpsutton I've just finished the patch for making it not blow up

dominicm04:07:49 Your review would be valuable of course 🙂


That’s a hell of a diff :)


It's mostly just moving code from A to B. git just gets a little confused because of the prefixing.


Yeah I was glancing at it. It’s too late tonight here but I’ll try it out and look on Sunday


I've been using deps for some time now, one feature I miss from Lein is that since deps Cursive can't figure the test roots because this is not supported by deps. Makes sense in terms of Clojure, but I was wondering if would be useful to also have some special key to tell Cursive (or any other editor) which as the test roots, this is useful for things like navigating to tests or creating new tests. what you think we use some custom keys on deps.edn to let Cursive knows which are the tests roots? maybe :cursive/test-paths, or :editor/test-paths, something in this direction


can I delete a expr without saving it to clipboard ?


@wilkerlucio Cursive will mark as a test root any source path that comes from an alias containing “test”.