This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-12
Channels
- # announcements (15)
- # babashka (8)
- # babashka-sci-dev (8)
- # beginners (19)
- # biff (18)
- # cider (7)
- # clj-kondo (1)
- # clojure (6)
- # clojure-europe (24)
- # clojure-norway (10)
- # clojure-spec (1)
- # clojurescript (11)
- # conjure (1)
- # core-async (1)
- # cursive (3)
- # devops (1)
- # emacs (1)
- # fulcro (1)
- # helix (4)
- # keechma (1)
- # off-topic (19)
- # pathom (4)
- # reagent (2)
- # reitit (1)
- # shadow-cljs (8)
- # spacemacs (1)
- # vim (7)
is there a way to get information about a dep i have added to my deps.edn, after i have started my nrepl, but before i require it? For example, will something tell me the required expression thats needed e.g (require '[clj-http.client :as client])
. Or do i have to go to github, like i have been dong all these long years. No be clear, this isn't a major headache, just asking in case there is some tiny productivity win i'm missing out on.
haven't heard of any such feature
however, it'd doable (implementable) like this:
• add dep
• start nrepl
• identify the .jar corresponding to the dep within the classpath that is found at runtime
• search for README.md within .jar
• open it in emacs, maybe jumping directly to the first (require
call (using regex)
thats super helpful. I need to start recording these todo items in a list so i can rank them.
🍻 . looking forward to a few PRs :) this one sounds to me like a nice one for clj-refactor.el (which has some project.clj / deps.edn goodies)
sadly I was wrong - README.md files aren't typically bundled in .jars (project.clj files are, which is mistook them for)
however you can do something pretty similar:
• add dep
• start nrepl
• identify the .jar corresponding to the dep within the classpath that is found at runtime
• identify all the .clj files contained within that .jar
• sort them by likelihood of being the "main" ns (e.g. foo.core), and let the user choose one of them, using Elisp completing-read
.
• finally, copy the selection to the clipboard so that one can paste that into an actual ns buffer (since the whole op was triggered from project.clj)