Fork me on GitHub

Do any of you know a good way to force nrepl output to go into the replpanel inside intelliJ?


Where else is it going?


Into the nrepl output in terminal, sadly


I take it you run nrepl from the terminal then connect with Cursive?


how does clojure decide which stream should get a particular ouptut? I can see the values of *out* are different in the terminal and in cursive, for example.

#object[ 0x207e6102 "[email protected]"]

=> #object[ 0x7da7dd2f "[email protected]"]


I'm not sure this is a Cursive thing, more of an nrepl one


afaik nrepl works on a request-response basis


cursive sends a request, nrepl replies


if you start nrepl outside of cursive, the latter won't have any control over the streams nrepl uses


Perhaps there is a way to configure nrepl itself to send stdout to its clients, but I wouldn't bet on it

👍 1

Do you have to start nrepl outside or can you start it from inside cursive?


I normally do the latter and nrepl output goes to the repl pane in that case


generally, I’ve been doing like you, and starting a repl inside cursive - however, the project I’m working on has stuff working in parallel to the nrepl, so it might not work.


hand on heart, I haven’t tried yet tho, was just wondering if there was a simple way to grab all the nrepl output into cursive ;)


This is a kind of murky area. nREPL does send output from evaluations to the client, and you should see those. For example, if you execute (println "Hello"). nREPL does this by binding *out* during evaluations, but that doesn’t work for everything, for example anything using System.out or anything kicked off from an eval which prints on a separate thread. If Cursive starts the REPL, then it controls the process and it will send the extra process output to the REPL pane too, but it can’t do that if you start it on the command line and then connect.

👍 1
Ivar Refsdal09:01:24

Hi @U3ZUC5M0R There is (by me) which links Personally I just make sure (when I'm running nrepl in the terminal) to evaluate that fix before doing any nrepl stuff --- i.e. I'm requiring a namespace that does the fix.

clojure-spin 2

@UGJE0MM0W amazing, that worked! thank you!

❤️ 1
Ivar Refsdal13:01:38

Glad I could help!


@U0567Q30W perhaps an option could be added for remote repls? I guess it’d need to restore `*out*` bindings on close as well, and perhaps disable opening more than one repl if it’s selected.


clojure-extras: a plugin which builds on Cursive and adds extra features like clj-kondo linting, and inline eval:

👍 3
❤️ 2
🎉 1

What exactly are the differences between using built-in clj-kondo vs specified from path?


the built-in one is running in a JVM and should be faster one it's started, the binary is used to shell out to every time you change something, which should also work fine


but if I use the binary then I might get updates quicker via brew, is that a good assumption?


but I hope and also think @UQTHDKJ8J will keep the plugin up to date

💯 1

and else you can help by doing so via a PR


Thank you for the info


this is a much much nicer integration already than file watcher or lsp

❤️ 2

at least in my experience


maybe in the future we can add a version selector like this, then we will be able to choose the version directly from maven.


Good idea, but that would mean clj-kondo would have to run in its own process rather than in the plugin. Still possible though, for example using the pod interface that it already has.


Not sure how cursive does, if it spawns a new process, or if use some advanced classpath thing from intellij if it spawn a new process, the communication can be done via pod -like process 👀


About the ‘open repl file buffer’. I would definitely like to be able to work with it like with plain text buffer, being able to modify it, copy and use it with vimium plugin. to achieve it with ‘add new repl command’ (may be someone will find it useful).


@UL05W6AEM There's a channel now: #clj-extras-plugin

thanks3 1

Cursive supports converting HTML to Hiccup on paste. Would it be possible to have the same thing for Fulcro's HTML? There is even a functions that does the job at Developers Guide -- Would people be interested in this feature? cc: @tony.kay

👍 3

The problem is knowing which to convert to, I guess that would have to be a project-specific flag, possibly with a checkbox on the popup. But I can do that, sure. Could you file an issue for that?


Thanks Colin! Project specific sounds like a good idea to me. Here's the issue: