Let’s say that I have an Erlang function, with spec.
-spec foo(integer(), string()) ->
boolean().
foo(_Integer, _String) ->
true.
My dream would be to generate the edoc from this information within Emacs automatically.
The generated code should look like:
%%--------------------------------------------------------------------
%% @doc
%% Your description goes here
%% @spec foo(_Integer::integer(), _String::string()) ->
%%% boolean()
%% @end
%%--------------------------------------------------------------------
-spec foo(integer(), string()) ->
boolean().
foo(_Integer, _String) ->
true.
Does a similar feature already exist?
I don’t know Erlang, but this might get you started:
EDIT: Closer, but will only work if args are on the same line 🙁
EDIT: Seems to work for args on separate lines now