This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-16
Channels
- # announcements (8)
- # aws (28)
- # babashka (26)
- # beginners (125)
- # calva (18)
- # chlorine-clover (2)
- # cider (12)
- # cljs-dev (6)
- # cljsrn (4)
- # clojure (134)
- # clojure-europe (31)
- # clojure-italy (2)
- # clojure-nl (14)
- # clojure-uk (83)
- # clojurescript (81)
- # conjure (4)
- # cursive (2)
- # datomic (145)
- # emacs (13)
- # events (3)
- # figwheel-main (14)
- # fulcro (30)
- # graalvm (23)
- # graphql (15)
- # helix (21)
- # jackdaw (20)
- # juxt (1)
- # lambdaisland (4)
- # leiningen (2)
- # malli (12)
- # meander (22)
- # observability (22)
- # off-topic (27)
- # pedestal (3)
- # re-frame (12)
- # reitit (1)
- # releases (2)
- # rewrite-clj (3)
- # shadow-cljs (67)
- # spacemacs (7)
- # sql (1)
- # tools-deps (19)
- # unrepl (2)
- # xtdb (25)
@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]?$")))
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
close enough, thanks for the idea!