Fork me on GitHub
#spacemacs
<
2020-07-25
>
Edmund08:07:44

Using cider, is there a way to eval-all in spacemacs like you can do if you are just using Emacs and cider? the furthest I can see is eval-buffer but not all files.

Edmund08:07:10

M-x and typing cider-eval-all.. shows the command. There aren't any key bindings for it off the bat though. Solves my problem for now.

practicalli-johnny09:07:22

Evaluating a buffer, , e b should evaluate all the required namespaces that buffer requires in its ms definition. So if you evaluate the main namespace, it should evaluate everything I can add a key binding for existing commands if they are generally useful. Let me know if you find this command useful and suggestions for keybingings ( which should be under SPC m e menu)

practicalli-johnny15:07:35

Interesting, cider-eval-all-files is an alias for cider-load-all-files . The documentation for this command says it loads files below a directory, so I assume you need to be at the top level of the project to load all the files. I would have thought cider-ns-reload-all would be a more general approach to (re) loading and hence evaluating all the files in the project (unless you have namespaces that are not used in the project yet and want to load them)

Edmund19:08:44

@U05254DQM Sorry for a long overdue reply. Just wanna say thank you for the above. Wasn't aware evaluating current buffer also does its required namespaces. Very useful information also. Thanks for taking time to help and for such a wonderful tool 🙂

👍 3