Call for public codebases
Just in case anyone is using genemichaels, if you have public projects with formatted code please let me know - I can test new releases on them to hopefully avoid unnecessary breakage.
I just recently formatted all of https://gitlab.com/elfeiin/riscv_vm using prior release. It's also where the macro issue arose and has a few comments as well (more than I usually do).
Oh thanks!
Check src/instruction.rs for macro usages that get formatted weirdly, specifically the bits! macro. genemichaels defaulting to spaces after colons is fine in the majority of cases but sometimes it can look odd depending on the context. In this case, it's two numbers with a colon between, so maybe that can be special-cased. However, you mentioned in another issue about using genemichaels-lib which I will look into for making custom formatters per-project (sounds fun, right??).
Sounds fun to me! :D
Special case macros like that are tricky... I think special casing would be difficult because that example could just as easily be (for instance) key-value pairs in a map (or like the tracing/log span structured data kv pairs syntax), and the formatter doesn't have enough context to figure it out. I think .. as a range separator might be less ambiguous, although I'm not sure how that'd be treated in macros currently.
Sounds fun to me! :D
Special case macros like that are tricky... I think special casing would be difficult because that example could just as easily be (for instance) key-value pairs in a map (or like the tracing/log span structured data kv pairs syntax), and the formatter doesn't have enough context to figure it out. I think
..as a range separator might be less ambiguous, although I'm not sure how that'd be treated in macros currently.
I would use .. but genemichaels puts spaces around it too
Ah... 😅