- make parameters_doc a dict intead of a list
BEFORE:
"parameters_doc": [
{
"buffer": "Buffer handle, or 0 for current buffer"
}
],
AFTER:
"parameters_doc": {
"buffer": "Buffer handle, or 0 for current buffer"
},
- make "return", "seealso", lists instead of strings
Changes the generated msgpack result values in the runtime/doc/*.mpack
files to be formatted like this (instead of being formatted like Vim help text):
[
'nvim_win_get_var': {
'signature': 'nvim_win_get_var({window}, {name}, {err})',
'parameters': [('Window', 'window'), ('String', 'name'), ('Error *', 'err')],
'parameters_doc': [{'window': 'Window handle, or 0 for current window', 'name': 'Variable name'}],
'doc': ['Gets a window-scoped (w:) variable'],
'return': ['Variable value'],
'seealso': []
}
},
...
]
Convenient for API clients who want to reuse the API docs in their own
docs. Could be used e.g. to eliminate nvim.net's own doxygen parser:
3a736232a4/src/NvimClient.APIGenerator/Docs
TODO: currently the result values are formatted as Vim help docs. We
should change the values to have structure, something like this:
[{
'nvim_win_get_var': [
'line1,
'line2',
[ 'item1', 'item2', ... ]
],
'nvim_win_set_var': [
...
],
...
}]
close#11296
- render_node() is now the main rendering function: it traverses a node
and builds the Vim help text recursively.
- render_para() is weird and ugly, it is the entry-point for rendering
the help text for one docstring'd function.