diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-08-17 11:14:58 +0100 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2023-08-23 12:16:04 +0100 |
commit | 2234b84a1b85832667ad4a23fd5dee0bd1c92b72 (patch) | |
tree | 3160214ddb7873708fd8508ed5345edd0b5abd7e /scripts/gen_eval_files.lua | |
parent | 21152f7905b5e2f472b1a745109f6316a7e5994d (diff) | |
download | rneovim-2234b84a1b85832667ad4a23fd5dee0bd1c92b72.tar.gz rneovim-2234b84a1b85832667ad4a23fd5dee0bd1c92b72.tar.bz2 rneovim-2234b84a1b85832667ad4a23fd5dee0bd1c92b72.zip |
docs(generators): bake into cmake
Diffstat (limited to 'scripts/gen_eval_files.lua')
-rwxr-xr-x | scripts/gen_eval_files.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/gen_eval_files.lua b/scripts/gen_eval_files.lua index 2990eef069..e41054ed65 100755 --- a/scripts/gen_eval_files.lua +++ b/scripts/gen_eval_files.lua @@ -1,5 +1,8 @@ #!/usr/bin/env -S nvim -l --- Generator for src/nvim/eval.lua +-- Generator for various vimdoc and Lua type files + +local DEP_API_METADATA = 'build/api_metadata.mpack' +local DEP_API_DOC = 'runtime/doc/api.mpack' --- @class vim.api.metadata --- @field name string @@ -168,11 +171,11 @@ end --- @return table<string, vim.EvalFn> local function get_api_meta() - local mpack_f = assert(io.open('build/api_metadata.mpack', 'rb')) + local mpack_f = assert(io.open(DEP_API_METADATA, 'rb')) local metadata = vim.mpack.decode(mpack_f:read('*all')) --[[@as vim.api.metadata[] ]] local ret = {} --- @type table<string, vim.EvalFn> - local doc_mpack_f = assert(io.open('runtime/doc/api.mpack', 'rb')) + local doc_mpack_f = assert(io.open(DEP_API_DOC, 'rb')) local doc_metadata = vim.mpack.decode(doc_mpack_f:read('*all')) --[[@as table<string,vim.gen_vim_doc_fun>]] for _, fun in ipairs(metadata) do @@ -282,7 +285,7 @@ end --- @return table<string, vim.EvalFn> local function get_api_keysets_meta() - local mpack_f = assert(io.open('build/api_metadata.mpack', 'rb')) + local mpack_f = assert(io.open(DEP_API_METADATA, 'rb')) --- @diagnostic disable-next-line:no-unknown local metadata = assert(vim.mpack.decode(mpack_f:read('*all'))) |