Fork me on GitHub

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.

👍 2

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


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.


Yeah, it's a good question


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


with a :all option flag as well?


There’s a 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.


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


Here’s the if you have anything to add!


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


Cool, thanks so much @U05254DQM!


You're doing the lords work @U05254DQM 🙂

😆 3

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

thanks 3

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!


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

👍 3