This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-26
Channels
- # announcements (1)
- # autochrome-github (1)
- # babashka (9)
- # beginners (112)
- # bristol-clojurians (2)
- # calva (26)
- # cider (10)
- # clj-kondo (31)
- # cljs-dev (40)
- # clojure (114)
- # clojure-austin (1)
- # clojure-dev (112)
- # clojure-europe (22)
- # clojure-germany (5)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-spec (10)
- # clojure-uk (96)
- # clojurescript (39)
- # core-logic (5)
- # datomic (40)
- # fulcro (34)
- # graphql (17)
- # jobs (3)
- # kaocha (4)
- # leiningen (10)
- # luminus (1)
- # malli (3)
- # meander (44)
- # midje (2)
- # off-topic (40)
- # pathom (5)
- # re-frame (8)
- # reitit (8)
- # ring (3)
- # ring-swagger (4)
- # shadow-cljs (83)
- # spacemacs (96)
- # tools-deps (16)
- # vim (4)
- # xtdb (15)
- # yada (20)
> hello! babashka looks really interesting (I’m interestedin porting a bash script). I noticed the README mentions that there’s editor integration. > > I’m using inf-clojure-minor-mode, however I don’t seem to have auto completion working (it complains about lumo.repl for some reason).
Chlorine (for atom) does auto-complete, load-file, and goto var definition 🙂
Hello @rymndhng. I've managed to have inf-clojure work with babashka using this config:
(use-package inf-clojure
:ensure t
:config
(setq-default inf-clojure-repl-type 'clojure)
(setq inf-clojure-completion-form
"(clojure.core/let [collect (fn [x y] (clojure.core/map
(clojure.core/comp str first)
(x y)))
refers (collect clojure.core/ns-map *ns*)
from-ns (->> (clojure.core/ns-aliases *ns*)
(clojure.core/mapcat
(fn [[k v]]
(clojure.core/map (fn [x] (str k \"/\" x))
(collect clojure.core/ns-publics v)))))]
(clojure.core/->> refers
(concat from-ns)
(clojure.core/filter
(fn [x] (re-find #\"%s\" x)))
(clojure.core/sort)
))")
(setq inf-clojure-arglists-form
"(:arglists (meta (clojure.core/resolve (quote %s))))"))
However, in the end I didn't keep using it. For me it was too limiting compared to cider. So now I just have this :bb
alias in my ~/.clojure/deps.edn
to emulate bb built-in libs, and I dev bb scripts as if they were clojure ones.
:aliases {
:bb {:extra-deps
{org.clojure/core.async {:mvn/version "1.0.567"}
org.clojure/tools.cli {:mvn/version "0.4.2"}
org.clojure/data.csv {:mvn/version "1.0.0"}
cheshire {:mvn/version "5.10.0"}}}
:test {:extra-paths ["test"]}
}
@dromar56 thanks for the tips. I have also found it a bit limiting compared to a cider environment 😉 that said, I’ve really enjoyed the fast startup times for little CLI scripts — for that kind of work I feel comfortable enough to not rely on autocompletion 😁
The config I linked should fix eldoc (you can see the arguments of the function at point in the minibuffer) and auto-completion, so at least you'll have that :)