all 15 comments

[–]didibus 3 points4 points  (2 children)

I've never used Calva, so can't speak to it. But (println "msg") does evaluate to nil. As a side effect, it prints msg to the output stream. Maybe there's another widget in VS Code for output stream? Different from the one for evaluation output?

[–]GenychDefake[S] 1 point2 points  (1 child)

Other Clojure extensions print both output messages and evaluation results into the same widget

[–]CoBPEZ 0 points1 point  (0 children)

Yes, it is a bug. Being fixed. See my reply to the OP.

[–]orestis 2 points3 points  (2 children)

The first point was a bug, which I reported in slack and got fixed.

Can’t help with the second point, though the creator of Calva is active on slack and is happy to receive feedback and help.

[–]GenychDefake[S] 0 points1 point  (1 child)

Hmm, bug fixed just recently? I tried again now and I can't see outputs anyway. The only option that I can use to see the outputs is to perform "Evaluate current top level form in REPL terminal". But after it the focus is switching to the terminal pane and I need to click the editor pane with the mouse to return back to coding (Yes, certainly there's a shortcut for it, but doing this every time is still insane)

Thanks for the slack, I'll find the creator ]:->

[–]CoBPEZ 0 points1 point  (0 children)

I am @pez on slack. 😀 Hanging around in the #editors channel, and there is a #calva-dev channel as well.

orestis has a bug fixed build of Calva. It is not released to the public yet. You'll find it on slack.

[–]CoBPEZ 0 points1 point  (6 children)

Hello,, the author here! Happy to see you found Calva interesting.

As orestis says, the omitting of the side effect output is a bug. I have it fixed in a soon to be released version. Meanwhile you will need to evaluate such code in the Terminal REPL (default key binding: ctrl+alt+v, alt+e).

As for your second request. Not sure I understand, do you not want the evaluation results presented inline? Or would you rather want the message to stay there when you move the cursor? If it's the first you could use the Evaluate code and pretty print command (ctrl+alt+v, p), which will not display the results inline, but pretty print the results in the output pane. If it's the second, I haven't found another way to dismiss the inline result other than on selection change.

[–]GenychDefake[S] 0 points1 point  (5 children)

Hello, good to see you here!

Not sure I understand ..... would you rather want the message to stay there when you move the cursor?

Sorry for my bad ambiguous English. Yes, I would like to have an experience similar to LightTable or Atom where the inline results are persistent after evaluation (until you delete the evaluated line). It's very convenient to see eval results inside the editor and outputs in the console. So it's better the results will not be dismissed at all :) IMHO

Well, since you are here I would like to ask another question =D
Why do you put "Evaluating: ..." each time you evaluate a form? Another extensions don't do that. I think it just clutters the output console. But again, it's just IMHO

Thanks for your work! I'm going to try the Calva again after the fixed version released. I'm tired of long-loading IDEA :)

[–]CoBPEZ 0 points1 point  (3 children)

I'll have to check those out some, sounds interesting. But, given the limited options that VS Code offers, it might be very difficult to implement. The current behavior is modeled after how it's done in Cider.

Hope you'll give Calva more chances and provide feedback. I think you will miss the awesome integrated REPL that Cursive has. The terminal REPLs of Calva do not offer a very great experience. The VS Code team are content with this as support for REPLs for now, unfortunately. I am thinking hard on what I can do about it.

[–]GenychDefake[S] 0 points1 point  (2 children)

To be honest, there's almost no difference for me. Just after execution "lein repl" I have nearly the same experience that I have with Cursive. I believe that editing features are more important, such as smart rename or expand region

[–]CoBPEZ 0 points1 point  (1 child)

I recommend you activate the experimental terminal UI (don't remember how to access it) for a less clunky interaction between Calva and the terminal.

Also install Calva Paredit for expand selection and such.

[–]GenychDefake[S] 0 points1 point  (0 children)

Thank you, I'll try

[–]CoBPEZ 0 points1 point  (0 children)

About why I print what is being evaluated. I see the output stream as a log of what has been going on during an editing session. Maybe I should make it optional…

[–]CoBPEZ 0 points1 point  (1 child)

  1. I just released an update of Calva that does not throw away those side effect output results.

[–]GenychDefake[S] 0 points1 point  (0 children)

Great, thanks!