Open
Description
In EEP 059 we state that:
The -doc attribute can be used for private function as well, so that tools and IDEs can provide docs if the user wants them to.
But, from what I can tell, the current mechanism to extract -doc
attributes is currently located in the private (as in -moduledoc false
) beam_doc
module, which only extracts them for exported functions.
Language servers often work with the source code directly (except for OTP libraries or dependencies), so having a defined API to extract doc attributes would be useful.
- What's the recommended API for language servers to extract doc attributes, since
beam_doc
is undocumented and could change at any time? - Maybe we could make
beam_doc
accept an option to regulate this behaviour? (Right now it would be possible to add anexport_all
attribute to the AST, but it feels like a hack).