-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate nixpkgs neovim doc from the code #137
Comments
@fricklerhandwerk if there was a single exemple in nixpkgs that shows how to generate doc from the code, I bet we would have a much much better (at least up to date) documentation. I want to update the neovim doc, we have plenty of new nice features but not having it tied to the code makes it just annoying enough. |
Yeah nixdoc has become so vital now, but is itself still somewhat crude and underdocumented. @hsjobeki said he wanted to touch it once again to make it output structured data. Then we wouldn't have to create abominations such as mine, which you can use as an example. Currently I can't spend any time on docs, but I take mental note that this is an issue with high leverage. Thanks @teto for prodding me. |
@fricklerhandwerk @teto A: Did you try to document a function ? ( From looking at your example documentation you just copied the from But in the nix repl
So i am trying to understand what the
cc @fricklerhandwerk we need to work on which For example:
Nixdoc has only (very opinionated) support for |
@hsjobeki thank you for following up. I am pretty excited about this.
That's indeed my intention. I want to generate the documentation for
Interesting. I am rarely this clueless in face of a program but in case of nixdoc I confess I have no idea what's going on. Is there a verbose mode to try to understand what's going on ? |
Yes.
No there is no verbose mode. Just diving into the code. But i wouldnt recommend it. Nixdoc does not Support your use Case. https://noogle.dev/f/pkgs/wrapNeovimUnstable I am in favor of formalizing some documentation exchange format. So we can just export the information from noogle. Instead of trying to extend and this incomplete and old tool. It does its job well, which it was designed for. But this example is where the tool has reached its limits. |
I would like to upgrade the neovim wrapper documentation and I prefer to document it within the code, ie.: pkgs/applications/editors/neovim/wrapper.nix.
I've patched doc/doc-support/lib-function-docs.nix to get a better understanding of what was going on since the doc is scarce.
I ended up handcrafting the following neovim_locations.json:
and I copy/pasted some valid doc from somewhere else ( I convertedh the triple backticks into two to avoid messing up the preview):
then I ran
which outputs the disappointing
I am not sure how to proceed from there and even once that is fixed, I dont know how easy it would be to use this in nixpkgs ?
The text was updated successfully, but these errors were encountered: