This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-06
Channels
- # adventofcode (1)
- # aleph (9)
- # announcements (22)
- # beginners (59)
- # boot (8)
- # calva (1)
- # cljdoc (7)
- # cljs-dev (10)
- # cljsrn (9)
- # clojars (10)
- # clojure (23)
- # clojure-dev (6)
- # clojure-europe (3)
- # clojure-italy (26)
- # clojure-nl (3)
- # clojure-seattle (1)
- # clojure-spec (46)
- # clojure-uk (85)
- # clojurescript (97)
- # core-async (13)
- # cursive (3)
- # data-science (10)
- # datomic (156)
- # duct (34)
- # emacs (37)
- # figwheel (3)
- # figwheel-main (9)
- # fulcro (59)
- # hyperfiddle (4)
- # immutant (1)
- # jackdaw (3)
- # jobs (1)
- # off-topic (112)
- # parinfer (1)
- # qlkit (2)
- # re-frame (1)
- # reagent (35)
- # ring-swagger (2)
- # shadow-cljs (104)
- # spacemacs (9)
- # speculative (12)
- # tools-deps (30)
- # yada (10)
When loading an emacs lib using (use-package .... :load-path
does it copy the file into melpa
To have the package downloaded from melpa, you have to add (use-package package-name :ensure t)
:ensure
like this.
ooh I worded that completely wrong. I meant in cases where I have the plugin in a local directory and use that , does it copy the plugin folder into the .emacs.d/elpa cache
@U1CUUKHDL. For that I think you can use :pin local
with :load-path "./"
in your use-package declaration.
Ah cool let me use that
anyone using clojurescript + CIDER + figwheel + one of [component, integrant]?
I'm interested in the Component part, never tried such a setup. I suspect it could be more robust.
does it work fine? any rough edges? I would imagine reconnection can be an issue as you reset
your Component system
Maybe resetting the sockets on every reset
would be a recipe for disaster... so my Component could just not do that
an useful thing that could be done on reset
is clearing the cljs compiler cache and such... it can get unrecoverably corrupt as one switches Git branches
I use figwheel main cider and integrant
And to be fair I rarely restart anything integrant just brings the system up
But everything works pretty well anyway
full stack
you just need things like
(defmethod ig/init-key :server/figwheel [_ {:keys [build] :as opts}]
(log/info "Running figwheel build " build)
(figwheel/start {:mode :serve} build))
and something like
(defmethod ig/init-key :server/jetty [_ {:keys [port host reload?]}]
(let [handler
(if reload?
(wrap-reload #'server/app-handler)
server/app-handler)]
(log/info "Running Jetty with auto reloading = " reload?)
(jetty/run-jetty handler {:join? false
:host (or host "127.0.0.1")
:port port})))
(defmethod ig/halt-key! :server/jetty [_ server]
(.stop server))
for jetty for example
it's quite easy to do
we also have nrepl and sass compilation there
no actually the figwheel in integrant bit is only used when running outside of Emacs
inside Emacs we still use the rest of the stuff, but figwheel main is started by Cider itself
there is just some code in user.clj
to start the rest of the integrant shebang
well it's one line
(ig.repl/set-prep! (constantly dev-config))
and then if you import this [integrant.repl :as ig.repl :refer [clear go halt init reset reset-all]]
you just have to type (go)
in your Clj repl
I can't share the actual code because it's from work but I'll add something similar now to my own OSS project which I can instead share
just got it working on one of my personal projects
integrant is really just handling jetty when you start with Emacs
hey! hmmm, let me make sure... I was talking about figwheel main is started by Cider itself
... that's the part I'm trying to avoid
the goal is having all the "server side" (figwheel, nrepl etc) inside Integrant. So emacs becomes a thin client
well you can probably do that but don't want you want a cljs repl?
you can start everything with integrant and do cider-connect into a running nrepl
but I'm not sure if cljs would work though