Fork me on GitHub
Toni Tuominen12:07:26

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.

Toni Tuominen13:07:14 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


can you post an example var from that repo?

Toni Tuominen13:07:19

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"))))`

Toni Tuominen13:07:25

since it makes highly nested structures it's not that nice that it formats them like function args


ok, please post the namespace in question, I need to see their code


thanks! I think the use case is pretty exceptional. Have you considered creating a PR adding :style/indent 0metadata 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)

Toni Tuominen13:07:38

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


or evaluate something in a buffer, that's not currently focused, would also be good


like (cider-eval-in-buffer "foo.clj" "(+ 1 2 3)")


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]:


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 - 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.

Toni Tuominen08:07:50

Link doesn't work


Ah, sorry about that. Should be available now.

Toni Tuominen10:07:55

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 I'm considering switching to this for my work project, as it seems behaves well.