There is research into using ML for automated formatting. Personally, I'm not a fan. The heuristics are relatively simple and when hand-authored can be explained. Throwing ML at it discards explainability and risks really weird formatting decisions on edge cases for relatively little upside.
My experience is that people prefer formatting that is:
1. Unsurprising.
2. Nice looking.
3. Simple.
In roughly that order. Using ML might increase 2 but at the expense of 1 and certainly 3.
My experience is that people prefer formatting that is:
1. Unsurprising.
2. Nice looking.
3. Simple.
In roughly that order. Using ML might increase 2 but at the expense of 1 and certainly 3.