Calva equivalent of Cursive's "sync files in repl" command

I am wondering if there is an analog in calva of cursive’s sync files in repl command. This
issue

implies that simply saving the source file does this. However, when I make a change and
save the file, the repl does not see the change.

1 Like

I’m not sure what the equivalent of that Cursive behaviour is, b/c lack of Cursive knowledge. I do know a lot about Calva though. :smile:

In Calva the act of loading the current file and the namespaces it requires is called loading the file. The command for it is named: Load Current File and Dependencies with the default shortcut:
ctrlaltc, enter.

There is a Calva setting for loading the file on save. It defaults to false, and I recommend keeping it that way. I think it is much better to be in control over what is loaded/evaluated. I often start with loading the file, and from there I evaluate things form by form as I edit them.

Calva also has commands for reloading all namespaces – Refresh All Namespaces, and for reloading only changed namespaces – Refresh Changed Namespaces.

If you are new to VS Code, I can tell you that the Command Palette is your friend. I have tried to name Calva commands so that they should be easy to find there. There is a doc page about that, here: https://calva.readthedocs.io/en/latest/finding-commands.html

1 Like

Thank you for answering. I appreciate your time. I did not think to look for the behavior of “load on save” as a setting which defaults as false. After some experimentation, I have found the functionality I’m looking for can largely be achieved with the “Load Current Namespace in REPL window” command.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.