Skip to content
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

list items (and nested list items) #12

Closed
justinmk opened this issue Sep 6, 2022 · 0 comments · Fixed by #16
Closed

list items (and nested list items) #12

justinmk opened this issue Sep 6, 2022 · 0 comments · Fixed by #16

Comments

@justinmk
Copy link
Member

justinmk commented Sep 6, 2022

In order for :help to render as something other than fixed-width, hard-wrapped text, (e.g. for HTML format) the parser needs to give some basic hints about structure besides "line". Sometimes (often) the :help source needs to be fixed (because it can't be reasonably parsed), but in other common cases it's probably reasonable for tree-sitter-vimdoc to provide some basic idea of:

  1. paragraph (and "nested" paragraphs? AKA indentation) paragraphs (and nested paragraphs?) #13
  2. list items (which may be nested) [this issue]

Example of a basic list

https://github.com/neovim/neovim/blob/52e4b779e3df1335efc4774e8dfc199d07e24bfd/runtime/doc/api.txt#L25-L34

Many clients use the API: user interfaces (GUIs), remote plugins, scripts like
"nvr" (https://github.com/mhinz/neovim-remote).  Even Nvim itself can control
other Nvim instances.  API clients can:

  - Call any API function
  - Listen for events
  - Receive remote calls from Nvim

The RPC API is like a more powerful version of Vim's "clientserver" feature.

Example of a nested list

api.txt has many nested lists. Maybe it's not worth supporting these?

https://github.com/neovim/neovim/blob/52e4b779e3df1335efc4774e8dfc199d07e24bfd/runtime/doc/api.txt#L3257-L3273

                 • callback (function|string) optional: if a string, the name
                   of a Vimscript function to call when this autocommand is
                   triggered. Otherwise, a Lua function which is called when
                   this autocommand is triggered. Cannot be used with
                   {command}. Lua callbacks can return true to delete the
                   autocommand; in addition, they accept a single table
                   argument with the following keys:
                   • id: (number) the autocommand id
                   • event: (string) the name of the event that triggered the
                     autocommand |autocmd-events|
                   • group: (number|nil) the autocommand group id, if it
                     exists
                   • match: (string) the expanded value of |<amatch>|
                   • buf: (number) the expanded value of |<abuf>|
                   • file: (string) the expanded value of |<afile>|
                   • data: (any) arbitrary data passed to
                     |nvim_exec_autocmds()|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant