-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Is it possible to support function documentation? #16
Comments
It seems like:
|
It'd be great to add this! I'm currently on a break and will keep this issue in mind when I return to working on open source! |
I'm just getting back to tackling a number of issues in this project, and I've made a new release that uses Pandoc v3 with a number of improvements. As part of that, I wanted to revisit this issue. Do you have in mind what you'd like the markdown file to look like? Right now, I see in your README.md, you have a ```vimdoc
api.get_tabs() *tabby.api.get_tabs()*
Get all tab ids
api.get_tab_wins({tabid}) *tabby.api.get_tab_wins()*
Get an winid array in specified tabid.
api.get_current_tab() *tabby.api.get_current_tab()*
Get current tab's id.
api.get_tab_current_win({tabid}) *tabby.api.get_tab_current_win()*
Get tab's current win's id.
api.get_tab_number({tabid}) *tabby.api.get_tab_number()*
Get tab's number.
api.get_wins() *tabby.api.get_wins()*
Get all windows, except floating window.
api.get_win_tab({winid}) *tabby.api.get_win_tab()*
Get tab id of specified window.
api.is_float_win({winid}) *tabby.api.is_float_win()*
Return true if this window is floating.
api.is_not_float_win({winid}) *tabby.api.is_not_float_win()*
Return true if this window is not floating.
``` Do you have thoughts on what you'd like to write in Markdown instead? Pandoc supports something called definition lists that we can co-opt for this purpose. I can make this: api.get_tabs()
: Return true if this window is floating. generate this:
Thoughts? |
Hi, I tried this, but get:
And furthermore, if I write these in README: buf.type()
: Get buftype option.
Return:
buftype, normal buffer is an empty string. check |buftype| or
<https://neovim.io/doc/user/options.html#'buftype'> for details. will generate:
The command I used: ./panvimdoc.sh --project-name 'tabby' --input-file README.md \
--vim-version 0.5 --toc 'true' --dedup-subheadings 'true' \
--description 'A declarative, highly configurable tabline plugin' \
--demojify 'false' --treesitter 'true' --ignore-rawblocks 'true' \
--doc-mapping 'true' --doc-mapping-project-name 'false' \
--shift-heading-level-by 0 --increment-heading-level-by 0
|
That’s the expected output I’m seeing in your comment. What are you expecting? |
The generated text differs from your explained in before. I expect to generate what I wrote in the This situation might not be easy to display nicely in both README and VimHelp; I just asking for help. If it cannot be made, it's also ok. |
My bad! I completely zoned out while typing that comment and was incorrect. Definition Lists at the moment generate a two column layout, i.e. buf.type()
: Get buftype option.
Return:
buftype, normal buffer is an empty string. check |buftype| or
<https://neovim.io/doc/user/options.html#'buftype'> for details. generates
However, level 4 markdown headers with the #### :FnlCompile[!] {doc=:FnlCompile}
Diff compiles all indexed fennel files
#### :FnlCompile[!]
Diff compiles all indexed fennel files
#### :[range]CommandName {doc=CommandName}
#### :[range]CommandName
will generate this:
It's not super pretty yet. I'm open to suggestions for markdown syntax that would look good in a Markdown file. I can figure out a way to generate the appropriate vimdoc text from that if we can decide on what the markdown file should look like. Right now both options I have currently implemented are not ideal. The definition lists are not rendered by GitHub and the level 4 headers have to have a Ideally it would be in a comment like so I'll leave this issue open till I come up with a better solution. |
Is this still work? I use this, but no anchor/tag is created, and the header will be in full uppercase. I have a new thought for the tag. Can you support And I found a workaround today: <!-- panvimdoc-include-comment ```vimdoc
*programName-line.cwd()*
``` -->
line.cwd()<a id="line-cwd"></a> And we can use this anchor by: The document of `line.cwd()` is in here: [line.cwd()](#line-cwd) |
I want to write a vim doc with many (lua) functions for neovim. Is it possible to generate a doc like this?
In https://neovim.io/doc/user/api.html
For legacy viml function, there are also a example, in https://neovim.io/doc/user/builtin.html
The text was updated successfully, but these errors were encountered: