vim.loader
Methods3
function M.find(modname: string, opts: vim.loader.find.Opts | nil) -> vim.loader.ModuleInfo[]
Finds Lua modules for the given module name.
Parameters
modnamestringModule name, or
"*"to find the top-level modules insteadoptsvim.loader.find.Opts | nilOptions for finding a module:
Returns
@since 0
function M.reset(path: nil | string) -> nil
Resets the cache for the path, or all the paths if path is nil.
Parameters
pathnil | stringpath to reset
Returns
- nil
@since 0
function M.enable(enable: nil | boolean) -> nil
Enables or disables the experimental Lua module loader:
Enable (enable=true):
- overrides |loadfile()|
- adds the Lua loader using the byte-compilation cache
- adds the libs loader
- removes the default Nvim loader
Disable (enable=false):
- removes the loaders
- adds the default Nvim loader
Parameters
enablenil | booleantrue/nil to enable, false to disable
Returns
- nil
@since 0