Pluto.jl
Pluto.jl copied to clipboard
Documentation of structs created with `@with_kw` from Parameters is not parsed in Pluto
When creating custom structures with @with_kw from Parameters.jl, eventual docstrings that are added to the custom structure are not parsed/shown by the in-built Pluto doc helper:

definition with Base.@kwdef parses the documentation properly but unlike a standard struct definition, the docstring is not sent as output to the cell where the custom struct is defined (The struct name is simply shown in the output like TEST2 in the image above)
I had this problem too, workaround was:
begin
Base.@kwdef struct Hello
world=123
end
@doc """
My cool struct!
asdf
""" Hello
end
(from https://github.com/JuliaPluto/PlutoUI.jl/blob/9eb6f719873780a00fe43138b8afb787d2066621/src/Builtins.jl#L437-L469 )
Ideally we'd be parsing the actual docstring/definition from the (macro expanded) code, that's on the todo list somewhere.