Fork me on GitHub

Fun story - seems we broke CIDER's trademark inspirational connection messages 4 years ago ( and no one noticed this until recently, including me. 😄

cider 2
💯 4
👏 2

Now it's fixed on master, and I even added a super hand interactive command named cider-inspire-me. 😉

Brandon Olivier15:04:15

Is there a way to get cider to indent Rum components in the same way that hiccup components are formatted? Or does everybody using Rum just accept the differences? Or not use auto formatting?

😀 1

You are looking for define-clojure-indent

Brandon Olivier15:04:47

Is that possible to generate dynamically? I'd need to enumerate every Rum component, no?


Dynamically from what source?

Brandon Olivier15:04:22

It just feels weird to me reading Rum code and seeing the base-hiccup and higher level rum components indented differently. Maybe I just need to get over it, but I'm used to reading just hiccup with Reagent and everything there is indented identically


No, I agree with you. I certainly prefer the hiccup indentation (and syntax, but that's a different matter).

Brandon Olivier15:04:21

Seeing code formatted like this

(rum-component {:class ["foo"]}
instead of
(rum-component {:class ["foo"]}
seems weird.


But in lieu of enumerating the components, where would clojure-mode find the symbols to indent differently?


You could have emacs read the rum source code and populate it that way, perhaps?

Brandon Olivier15:04:53

I'm not sure, I wanted to ask before digging in too deep with my limited expertise.

Brandon Olivier15:04:07

Would it be possible to have Rum attach metadata to the functions to indent them differently?


clojure-mode indentation is not dependent on a repl

Brandon Olivier16:04:05

Hmm. I guess I can just always put props on a newline. Then the indentation seems right to me.


That is certainly a pragmatic solution.


that's what we do with #helix components


we have a style preference for props going on a newline when a child is passed in


Hello, I am using emacs and i am using deps.end for a project. This is my dev alias

{:extra-paths ["dev"]}
when i cider-jack-in i need to re-eval user namespace in order to run mount/start and to get project going. When i do clj -A:dev in that terminal repl i can (mount/start) right away. Why is this? How can i make cider-jack-in behave how i expect it to behave? This is the command cider-jack-in is using at the moment
/usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.7.0"} cider/cider-nrepl {:mvn/version "0.25.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]'
i don't want to have to edit it every time i run the project


CIDER has a variable cider-clojure-cli-aliases. I often see this set in a .dir-locals.el file


Where do you put .dir-locals.el? In project folder?


Yeah. Project root makes a lot of sense


Some example of using .dir-locals.el Emacs will need to be forced to load .dir-locals.el if that file is added after a Clojure/Edn file is opened, using revert-buffer command (or reopen the Clojure/Edn file) before running the REPL command from that buffer Alternatively, usie the universal argument, C-u before calling cider-jack-in to get an editable command in the mini buffer


I think Cider now also defaults the dev alias, so if you setup a :dev alias in your deps.edn, you can specify dev specific extras and jack-in should have them


I hope there is a Cider variable to disable the automatic loading of the dev alias I prefer to be explicit in the aliases I want loaded when running the REPL and may not want :dev always loaded, especially if I have broken something in dev/user.clj as that could stop the repl process starting.


Oh, nevermind, I was wrong haha, forgot that I had added this to my config: (setq cider-clojure-cli-aliases ":dev")


Thanks for letting me know

Ian Fernandez20:04:59

why cider is sending :cider.enrich-classpath/found ,,,,, and :cider.enrich-classpath/omitting-empty-source and :cider.enrich-classpath/timed-out to nrepl buffer lots of these and taking too long to start? 😞


enrich-classpath is disabled by default these days, make sure you're using CIDER latest stable

👍 1