This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-15
Channels
- # aleph (5)
- # announcements (1)
- # architecture (35)
- # babashka (9)
- # beginners (87)
- # chlorine-clover (13)
- # cider (3)
- # cljdoc (12)
- # clojure (16)
- # clojure-australia (2)
- # clojure-dev (4)
- # clojure-europe (5)
- # clojuredesign-podcast (21)
- # clojurescript (19)
- # conjure (1)
- # core-async (1)
- # data-science (1)
- # emacs (44)
- # events (2)
- # helix (1)
- # leiningen (2)
- # malli (31)
- # pathom (3)
- # pedestal (31)
- # portal (3)
- # reagent (20)
- # reitit (5)
- # reveal (2)
- # rewrite-clj (18)
- # tools-deps (6)
- # xtdb (5)
is there a way to auto-eval an expression in the REPL on namespace load? basically what I'm trying to do is auto-refer clojure.repl/doc
into every namespace, because I pretty much always find myself typing (require clojure.repl [:refer doc])
in every repl session so it's available in the namespace I'm working in. just wondering if there's a general purpose solution to this that could be used to auto-load other code, as well.
There's a REPL shortcut to require the REPL utils in some namespace. Type ,
in the REPL and you'll see what I mean.
@afoltzm I'd suggest just using cider-docs
and evaluate code in the source code buffer rather than evaluate in the REPL buffer directly, which requires more work (changing namespaces, etc). There is also cider-clojuredocs
which also provides examples of using the function and cider-apropos
that will help you find functions.
https://practicalli.github.io/spacemacs/documentation/cider-doc.html
If you really have to use the REPL buffer directly and need doc, ,
will open a REPL menu which has a doc function.
If you really want to type (doc function-name), then you can use the the fully qualified name, (clojure.repl/doc function-name)
You could require refer doc in every single namespace function of every project you ever work with, which I am sure will raise a few questions about why. I would definatey not recommend this 🙂