Fork me on GitHub
#cursive
<
2018-03-16
>
cfleming00:03:09

@joelsanchez Is that CLJ, CLJS or CLJC?

cfleming00:03:04

@hlship Unfortunately there’s no good way to do that right now, your macro would have to resemble something which Cursive currently understands, and I can’t think of anything that looks like that.

hlship18:03:56

This was kind of a plea to think about it. I could artificially make it look like a let, but feel dirty about doing that "just" for IDE support.

hlship18:03:41

You can see the full macro in this blog post: http://medium.com/@hlship/-575d5047924c ... feedback welcome!

cfleming00:03:51

@dragoncube What sort of REPL are you using? nREPL or clojure.main?

dragoncube00:03:43

@cfleming I’ve tried both.

cfleming00:03:28

So when you’re using nREPL, you should get a popup asking for input if you use something like (read-line)

dragoncube01:03:19

ok, for clojure.main it works, I was confused where I have to type my input

dragoncube01:03:18

it works even without (read-line):

user=> (loop []
  (println (.read (System/in)))
  (recur))

a
97
10
b
98
10
c
99
10
a, b and c my input

dragoncube01:03:09

but with nREPL it does not work

dragoncube01:03:37

ok, it is clear now

cfleming01:03:02

@dragoncube Sorry for the confusion. This is a tricky UI problem. All Clojure REPLs suffer from it to some degree (especially under nREPL), but it’s particularly bad in IntelliJ because of how editors work.

dragoncube01:03:39

yeah, no problem

cfleming01:03:11

The tl;dr is that editors are strongly typed, so the REPL editor is generally a Clojure editor. That will freak out if you’re trying to type standard text into it, so when I finally add better support for streaming REPLs I’ll need a switch to change that editor to a plain text one.

cfleming01:03:24

I’m still not sure how to explain it to users, especially new users.

dragoncube01:03:48

I was trying to put cursor (focus) into output region

dragoncube01:03:15

but after pressing first char it is returning focus to repl editor

cfleming01:03:50

Yeah, that’s essentially the same problem. Ideally there would just be one pane, but in order to get the IntelliJ functionality in the REPL editor it has to be a Clojure editor, and the output pane can’t be because it doesn’t contain valid Clojure.

cfleming01:03:56

That’s why the panes are split in Cursive.

tengstrand12:03:49

I try to add support for “Parinfer, smart mode”. I have IntelliJ IDEA 2017.2.6, and Cursive plugin 1.6.3-2017-2 installed. I try to follow the instructions: https://groups.google.com/forum/#!topic/cursive/ZJ4fcp3A988/discussion I download the file 1.7.0-snapshot2-2017.2, but when I press “Install plugin from disk” I can’t select the file and if I try to unzip it first, I can select it but nothing happens.

cfleming21:03:29

@teng I’m not sure why that should be the case - you don’t need to unzip it.

cfleming21:03:53

But the new parinfer is now available in the latest EAP, so you can just enable EAPs (https://cursive-ide.com/userguide/#eap) and install that from the repo as usual.

tengstrand22:03:34

Now it works, thanks @cfleming!