diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-10-04 02:13:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 02:13:31 -0700 |
commit | b45c50f3140e7ece593f2126840900f5cc3d39ea (patch) | |
tree | 20e9c304a14f129c26be769f9171dba0bcaba5b9 /runtime/lua/vim/loader.lua | |
parent | f62728cd80a9c458b1c0ef7c5c1251e55fe91090 (diff) | |
download | rneovim-b45c50f3140e7ece593f2126840900f5cc3d39ea.tar.gz rneovim-b45c50f3140e7ece593f2126840900f5cc3d39ea.tar.bz2 rneovim-b45c50f3140e7ece593f2126840900f5cc3d39ea.zip |
docs: render `@since` versions, 0 means experimental #30649
An implication of this current approach is that `NVIM_API_LEVEL` should be
bumped when a new Lua function is added.
TODO(future): add a lint check which requires `@since` on all new functions.
ref #25416
Diffstat (limited to 'runtime/lua/vim/loader.lua')
-rw-r--r-- | runtime/lua/vim/loader.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua index 0211e8d4a1..e86d33bf53 100644 --- a/runtime/lua/vim/loader.lua +++ b/runtime/lua/vim/loader.lua @@ -289,6 +289,9 @@ function Loader.load(modpath, opts) end --- Finds Lua modules for the given module name. +--- +--- @since 0 +--- ---@param modname string Module name, or `"*"` to find the top-level modules instead ---@param opts? vim.loader.find.Opts Options for finding a module: ---@return vim.loader.ModuleInfo[] @@ -377,8 +380,10 @@ function M.find(modname, opts) return results end ---- Resets the cache for the path, or all the paths ---- if path is nil. +--- Resets the cache for the path, or all the paths if path is nil. +--- +--- @since 0 +--- ---@param path string? path to reset function M.reset(path) if path then @@ -398,6 +403,8 @@ end --- * adds the Lua loader using the byte-compilation cache --- * adds the libs loader --- * removes the default Nvim loader +--- +--- @since 0 function M.enable() if M.enabled then return @@ -421,6 +428,8 @@ end --- Disables the experimental Lua module loader: --- * removes the loaders --- * adds the default Nvim loader +--- +--- @since 0 function M.disable() if not M.enabled then return |