clojureVSCode icon indicating copy to clipboard operation
clojureVSCode copied to clipboard

Reload a file to a running REPL

Open buzzdan opened this issue 6 years ago • 3 comments

It would be great to have the option to change the code and reload the file to the repl instead of restarting it

Dan

buzzdan avatar Oct 24 '17 08:10 buzzdan

Hi @buzzdan

I'm not sure I understand you correctly. Isn't it possible right now to reload a changed file by evaluating it once again?

avli avatar Oct 26 '17 10:10 avli

hi @avli and thanks for the great extension i'm quite new to clojure so sorry if i got it wrong.

the ways i know to reload it is: 1 - restart the repl 2 - reload the namespace inside the repl

what i ment is to have an easier flow to use:

  • either by using a keybinding to reload the current file (maybe by sending the reload command the to repl ?)
  • or by using a file watcher that reloads the namespace automaticly

is there anything else i might be missing ?

Thanks again Dan

buzzdan avatar Oct 26 '17 13:10 buzzdan

I think the easiest way to achieve what you want is to use "Clojure: Eval" or "Clojure: Eval and show the result" commands provided by the extension. These commands send the current file to the REPL. The commands are available in the command palette that can be called by Ctrl-P or Command-P if you're using macOS.

avli avatar Oct 26 '17 18:10 avli