Open vsironja-enghouse opened 2 days ago
Hi! Thanks for the encouragement! We love to provide! ❤️
This is not alignment breaking, it is alignment working. 😄
cljfmt (which Calva uses for formatting, and to some extent for indenting) has default indent configuration which includes Compojure symbols, like GET
:
It specifies that the arguments should not “hang”. The reason the arguments to foo
and get
(including foo2/get
) hang is that they do not have default configuration and thus use the default indent rules.
I hope that makes sense?
Hello! Thanks for the clarification, I understand only some special keywords are handled differently. I don't really have opinions on formatting, yet it's always an element of surprise when sexp root get, GET and XGET align differently. Also, I wouldn't even notice, but we're maintaining code written in Emacs/Cider and IntelliJ, which of course don't have this special treatment and I always break the diffs when saving. Anyhow, thanks and keep up the excellent work and if by any chance possible, please do make it configurable. Bye! :) Vlado
if by any chance possible, please do make it configurable
Calva only uses cljfmt, so you can't configure to use some other formatter, really. But cljfmt is highly configurable, and Calva gives you access to this. See https://calva.io/formatting/#configuration for the Calva side of things. That page has links to the documentation for cljfmt's config.
Cool, I'll look into that, thanks a lot, please close the issue. Bye
Hello, first things first: thanks for great work! Second, I found an alignment issue in special case when using namespaces and a function name containing only capitals:
We're talking about: Function Arguments Alignment
Running Windows Visual Code 1.92.2 with Calva v2.0.472
Thanks Vlado