nvim_runtime_lua

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
modnamestring

Module name, or "*" to find the top-level modules instead

optsvim.loader.find.Opts | nil

Options for finding a module:

@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 | string

path 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 | boolean

true/nil to enable, false to disable

Returns
nil

@since 0