I think we need better tooling to discover optional keyword arguments. Maybe this needs to be dealt with in Base, rather than VSCode, Juno, etc.
Consider the following scenario:
In Makie, we have many plotting functions with different optional keyword arguments for each. You don’t want to specify default values for them so you have to use the
some_plot(; kwargs...) syntax. But this doesn’t tell the user what they can use. Of course you can document all the keywords, but this is not accessible to any tooling, unless they parse the docstring looking for a specifically formatted list of possible keywords. Maybe you even need some dynamism here and want to change the possible keywords at runtime because of some conditions?
I think we need something along the lines of
propertynames, which solves the same problem for arbitrary additional fields, only we need it for arbitrary keyword arguments.
Imagine you could define
Base.optional_keywords(p::plot_function) = (:linewidth, :color, :markersize), would that not be helpful in a lot of cases?