Formatter: keep functions grouped?

Is there a formatter option that groups same-arity functions grouped (or at least abstains from inserting a newline from already grouped functions)?

F.e. I’d like to have, or at least keep, a/2 below grouped together:

defmodule A do
  def a(a1,[]) do
  end
  def a(a1,a2) do   # DO NOT insert newline here
  end
  # DO insert newline here
  def b(b1) do
  # etc.

Search on existing topics comes up short.