Fork me on GitHub

@drewverlee I have just tried cider-eval-all-files from the project-name/src directory and it does load in new definitions (Edit: it does not unload stale definitions). I tested this function using the latest Cider 0.25 with Spacemacs and a deps.edn project. It does seem to run in the background if used on a larger project or code that is long running, so its not tying up Emacs. It fails if the code doesn't compile though, but I would expect that :) cider-ns-refresh is what I would probably use if I wanted to refresh all the code in the REPL


It should not unload anything, as it’s pretty basic:

(defun cider-load-all-files (directory)
  "Load all files in DIRECTORY (recursively).
Useful when the running nREPL on remote host."
  (interactive "DLoad files beneath directory: ")
  (mapcar #'cider-load-file
          (directory-files-recursively directory "\\.clj[cs]?$")))


(eval-all-files is just an alias for that one)


Ah my bad, the definitions are in the REPL, its just clj-kondo telling me the function doesnt exist anymore 🙂 I corrected the original reply to avoid confusion...


Is it doable to keep the output from a cider-eval-sexp-at-point inside the clj file? so i can save it with all the results printed. i remember having this with lispxmp and emacs lisp.


cider-eval-print-last-sexp and cider-pprint-eval-defun-at-point might be helpful for you


Ah cool i just binding the cider-eval-print-last-sexp to a key and now i can C-c C̣-f and C-c C-ạ and it print the last output into the file.


on a fresh project built with clj-new i can confirm that "cider-refresh" correctly finds new symobls (functions, etc). However, on the current project i'm working on, it doesn't. on top of which, after using it. when i eval my namespace it complains that i'm re aliasing something in the ns, which it doesn't. Does this sound familiar to anyone? In short, what works for me is directly re-evaling the new symbols/functions and killing and restarting my repl.


is there a variable that lets me specify how the inspector will display the inspected's contents? I want maps to generally be printed with a kv pair per line


you can toggle line truncation


and add that to cider-inspector-mode-hook to have it done all the time


close enough, thanks for the idea!