How to search for nested functions, like rustPlatform.buildRustPackage
afreakk opened this issue · comments
I tried
nix-doc rustPlatform.buildRustPackage
but it gives me nothing.
Maybe im missing something
@afreakk this tool is too dumb for that 😆
It searches the regex in all defined sets in the given directory, which inherently cannot do that. You can try out the recently added Nix plugin, which may do what you want (it may equally not, because the plugin is not smart enough to work with stuff with sets having __functor and other indirections). These limitations are unfortunately the result of Nix not having a documentation implementation that can cross wrapper functions and this project being, at a fundamental level, a hack that still is usually a vast improvement over the previous situation.
I should add a link to related works in the readme but as I learned after writing this, adding a similar feature to Nix proper died to a bikeshed over what markup language to use for comments, and there was actually a pull request adding it natively in 2018 that didn't get merged. As far as I'm aware, that implementation also had similar limitations.
Update two: The new ctags implementation can also find non-function or nested things, but again, it is not very clever about it :P