Reputation: 413
Is there ability to configure .formatter.exs
so formatter does 2 new lines between functions in module?
Example:
@spec start_link(String.t()) :: {:error, String.t()} | {:ok, pid()}
def start_link(url) do
Agent.start_link(fn -> %Links{url: url, remaining: [url]} end)
end
# 2 lines
#
@spec has_more_links?(pid()) :: boolean()
def has_more_links?(agent_pid) do
length(get_remaining_links(agent_pid)) > 0
end
Thank you!
Upvotes: 2
Views: 240
Reputation: 222040
This isn't supported at the moment. The documentation says:
The formatter respects the input format in some cases. Those are listed below:
...
Newlines inside blocks are kept as in the input except for: 1) expressions that take multiple lines will always have an empty line before and after and 2) empty lines are always squeezed together into a single empty line
...
Upvotes: 4