Fork me on GitHub

I don't know what's going on. Will look at it.


I updated the issue now with some comments on the problem.


I replied that I don't think it was actually an ns issue... but now I'm getting some confusing results. Will start with a new, empty project and report what I'm seeing later today I hope. Thanks!


with the errors missing, this is the only way I've found to reason about whether eval-file works or not


if you are missing that nil repsonse, it didn't succeede


Yeah, that's what I wrote in the comment as well. Even though the result can be something else than nil, it should just be the eval result from the last form.


Tried with a new project and am more confused now 馃槙. I did lein new calvatest, opened the project with VSCode, did cd calvatest and lein repl and then connected Calva to the REPL, and then if I put my cursor in the ns form in src/calvatest/core.clj and do "Evaluate selection or current form" then I get (inline in the editor, from where I can't copy text) => Syntax error (ClassNotFoundException) compiling at ...


I was able to get "Run Selected Text" to work again in the new project, although it took some juggling that I'm not sure how to re-create, with the text initially being sent to a shell terminal rather than the Clojure REPL.


But bottom line I can't see how the printing to "Calva says" works in the new project because I can't get the "Evaluate" (as opposed to "Run") items to work.


FWIW I'm using Calava 1.3.64 (the one in the marketplace) and your steps work fine for me


位 lein new calvatest
Generating a project called calvatest based on the 'default' template.
The default template is intended for library projects, not applications.
To see other templates (app, plugin, etc), try `lein help new`.
 位 cd calvatest
 位 lein repl
nREPL server started on port 54615 on host - 
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0


I evaluate the ns form, then defn foo .., (foo) and (foo "a") using Calva: Evaluate selection or current form


my "Calva says" output looks like


huh -- thanks for the report @lilactown! Will try again, maybe this time quitting/restarting VSCode first...


@lspector , I think what was missing for you was that you did not load the file before you evaluated the form.


Ah... true that I didn't load the file... and YES that fixes it! So that adds another step that has to be done... (will try to remember! perhaps this process is documented somewhere I've missed it, or could be?)


I am also now seeing println output in Calva says, when I use "Evaluate ..." commands, so that's great.


I'm seeing some error messages now too... not sure why, of it's reliable, but glad to see that.


But here's something weird: whenever I edit my code and save I see "Evaluating file: ..." in Calva says. Is it really evaluating it? It is not printing results which should be if it were evaluating it. In any event, I do not want it evaluating anything when I save. I realize some environments evaluate things on saving, but I think that can be really problematic. I want it to evaluate only when I tell it to, and only to save when I tell it to save.


One other piece of more minor feedback re: the "Evaluate ..." commands: Can I prevent it from putting results in the editor pane? The most important thing for me is that the results do go to some other text output place, as they now appear to go to Calva says (I'm not completely clear on how correct/reliable this is yet, but it's the right idea). But FWIW I find it confusing for them also show-up-but-not-actually-be in the editor pane, particularly for large values. If they do have to appear there, is there a way to clear them other than changing the text in the editor?


Press ESC to dismiss the inline displayed results.


Ah -- nice -- thanks


Experimenting with def forms and printing values it looks like saving doesn't actually re-evaluate the file, which is great, but it makes the "Evaluating file:" message that appears in "Calva says" a bit more mysterious.