This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-08
Channels
- # announcements (2)
- # babashka (100)
- # beginners (25)
- # biff (7)
- # calva (13)
- # cider (24)
- # clj-kondo (39)
- # cljsrn (2)
- # clojure (22)
- # clojure-dev (13)
- # clojure-europe (12)
- # clojure-gamedev (3)
- # clojure-losangeles (2)
- # clojure-nl (1)
- # clojure-norway (3)
- # clojure-spec (11)
- # clojure-uk (2)
- # clojurescript (20)
- # core-async (8)
- # cursive (7)
- # data-science (2)
- # datomic (14)
- # emacs (6)
- # events (7)
- # fulcro (9)
- # honeysql (1)
- # kaocha (24)
- # lambdaisland (3)
- # leiningen (6)
- # lsp (30)
- # membrane (7)
- # missionary (10)
- # nbb (48)
- # nextjournal (13)
- # off-topic (6)
- # parinfer (4)
- # pathom (1)
- # polylith (1)
- # reagent (7)
- # rewrite-clj (6)
- # ring (11)
- # sci (7)
- # shadow-cljs (8)
- # sql (13)
is there a way to set indent style for a whole namespace?
similar to (put-clojure-indent 'my-ns/do 1)
but with a wildcard?
sounds an odd thing to want. A ns can have all sorts of macros (and it's subject to future changes), each with a different indent style.
https://github.com/fulcrologic/semantic-ui-wrapper there's a ton of ui-* components and I'd like to set a style for all of them in one go instead of having to list each one individually
I would use it like this ` (sui/ui-table-row {} (sui/ui-table-cell {:singleLine true} name) (sui/ui-table-cell {} net-multiplier) (sui/ui-table-cell {:singleLine true} (sui/ui-button {:color "blue"} "Muokkaa") (sui/ui-button {:color "red"} "Poista"))))`
since it makes highly nested structures it's not that nice that it formats them like function args
thanks!
I think the use case is pretty exceptional. Have you considered creating a PR adding :style/indent 0
metadata to all those vars?
You could complete it with a deftest asserting that all vars in that ns have that metadata, that way it will be future-proof
You could even do it programatically in one go, e.g. (doseq [v (ns-publics (the-ns 'fulcro-blah))])
CIDER will pick it up
Best of all, you can try it locally before creating a PR (and you can refrain from a PR at all)
I'll give it a go thanks
When I am not in a cider-connect buffer, but I want to eval something against the most recently used JVM Clojure, can I do this in elisp, and how?
The use case, I'm in a .cljs
buffer which is not connected to a REPL, but the JVM Clojure project does use the .cljs
file so I want to send a command to that REPL to process it
I don’t know the answer, but just if it’s useful for anyone: inf-clojure
works like that by default [1]. I do that a lot for developing libs and testing them on the fly on its clients.
But then, of course, by using inf-clojure
you loose all nrepl and cider goodies.
[1]: https://github.com/clojure-emacs/inf-clojure/
My goal is to have both clj&cljs repls working in a single project. Currently I run shadow in a terminal so would like to connect to it. What is the right workflow to achieve this? Do I cider-jack-in-clj and cider-connect-cljs. Should these be in the same session. My understanding is that sessions group client nREPLs to use the same nREPL server. But don't I have two nREPL servers, on for shadow (cljs) and one for the backend clojure?
@fenton here's how I've set things up for full stack work in the past in case it provides some pointers https://github.com/codeasone/starter-cider-tools-deps-shadow - been using the approach for over a year now with no workflow issues under cider, taping out to the shadow cljs inspector from both clj and cljs contexts in particular is great.
Link doesn't work
Yeah works now thanks
@U191H9E5C how do I buy you a beer? Thanks for clearing the path buddy, very much appreciated!
Ha ha, and I thought I was a bit mad for going off-piste originally, glad you've found something that works for you.
@fenton another (more mainstream?) approach to getting your REPLs in order with respect to clj(cs)
files and sesman
https://gist.github.com/codeasone/6b2edf963915621ee66f938364875cd6. I'm considering switching to this for my work project, as it seems behaves well.