aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/api.lua
diff options
context:
space:
mode:
authorJongwook Choi <wookayin@gmail.com>2023-12-28 17:50:05 -0500
committerJongwook Choi <wookayin@gmail.com>2024-01-02 11:32:32 -0500
commit4e9298ecdf945b4d16c2c6e6e4ed82b97880917c (patch)
treef4e93f71e0c7d40fe17d76718746376c2d82268c /runtime/lua/vim/_meta/api.lua
parent67f53323446d45bad7a22e92493f6402316a8ba1 (diff)
downloadrneovim-4e9298ecdf945b4d16c2c6e6e4ed82b97880917c.tar.gz
rneovim-4e9298ecdf945b4d16c2c6e6e4ed82b97880917c.tar.bz2
rneovim-4e9298ecdf945b4d16c2c6e6e4ed82b97880917c.zip
refactor(gen_vimdoc): generate function doc from metadata, not from xml
Problem: For function definitions to be included in the vimdoc (formatted) and to be exported as mpack data (unformatted), we had two internal representations of the same function/API metadata in duplicate; one is FunctionDoc (which was previously a dict), and the other is doxygen XML DOM from which vimdoc (functions sections) was generated. Solution: We should have a single path and unified data representation (i.e. FunctionDoc) that contains all the metadata and information about function APIs, from which both of mpack export and vimdoc are generated. I.e., vimdocs are no longer generated directly from doxygen XML nodes, but generated via: (XML DOM Nodes) ------------> FunctionDoc ------> mpack (unformatted) Recursive Internal | Formatting Metadata +---> vimdoc (formatted) This refactoring eliminates the hacky and ugly use of `fmt_vimhelp` in `fmt_node_as_vimhelp()` and all other helper functions! This way, `fmt_node_as_vimhelp()` can simplified as it no longer needs to handle generating of function docs, which needs to be done only in the topmost level of recursion.
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
-rw-r--r--runtime/lua/vim/_meta/api.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index c0dfa7635b..b6ce3fce8a 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -73,6 +73,9 @@ function vim.api.nvim__id_dictionary(dct) end
function vim.api.nvim__id_float(flt) end
--- @private
+--- NB: if your UI doesn't use hlstate, this will not return hlstate first
+--- time.
+---
--- @param grid integer
--- @param row integer
--- @param col integer