spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
practicalli-john 2021-05-11T13:03:02.103700Z

I've started letting LSP do the formatting control in my practicalli/spacemacs.d configuration, rather than Cider. This seems to work quite well, although it seems to be missing automatic vertical alignment of pairs, as in let statements, loop or for arguments or in hash-maps. I've also added updates from the spacemacs.tempate after pulling the latest commits to Spacemacs itself. https://github.com/practicalli/spacemacs.d

👍 1
ericdallo 2021-05-11T15:50:33.103900Z

Nice! Yes, there is a issue for that on cljfmt :) c/c @lee

lread 2021-05-11T15:54:53.104100Z

Yeah, I’m trying to get some input on what folks would want for vertical alignment formatting from cljfmt. My thinking is something you’d have a preference for (on or off) but something you want to sometimes enable/disable for a specific forms, probably through some inline directive.

ericdallo 2021-05-11T16:02:12.104300Z

Yeah, it's a good question

ericdallo 2021-05-11T16:02:55.104500Z

maybe some way to specify the forms you want vertical align would work for everyone?

ericdallo 2021-05-11T16:03:05.104700Z

with a :all option flag as well?

lread 2021-05-11T16:34:04.104900Z

There’s a https://docs.cider.mx/cider/indent_spec.html which, for some reason, has not been widely adopted. Maybe we could add an inline {:style/vertical-align (true|false)}. Which would override some project default which would override a default of false.

practicalli-john 2021-05-11T17:33:02.105100Z

Thanks for the reminder, I will go and add some examples and my shopping list of features 🙂

lread 2021-05-11T17:34:36.105300Z

Here’s the https://github.com/weavejester/cljfmt/issues/36 if you have anything to add!

practicalli-john 2021-05-11T18:01:58.105700Z

@lee I've added some initial thoughts and examples of what I currently do. I'll add more if I think of anything. Happy to do some beta testing if needed. Thank you.

lread 2021-05-11T18:02:19.106Z

Cool, thanks so much @jr0cket!

emilaasa 2021-05-11T18:03:03.106200Z

You're doing the lords work @jr0cket 🙂

😆 1
practicalli-john 2021-05-11T18:09:38.106500Z

Possibly, but the work for which lord I cannot be certain of though 🙂 I certainly appreciate @lee spending time on this issue and @ericdallo for all the help with making lsp work for me (and a great many others)

1
lread 2021-05-11T18:14:34.106800Z

Thanks John, I started work on cljfmt vertical alignment in Feb of 2019, and then figured I should fix a bug in rewrite-cljs to aid the fix, then… well… rewrite-cljc then rewrite-clj v1 and finally… maybe I’ll actually get back to what sparked my meandering journey: the cljfmt vertical alignment feature!

lread 2021-05-11T18:15:44.107Z

I’ll certainly take you up on your offer of testing when the time comes!

👍 1