From 2e3c16e5265050e7b5752df208490deb9a4245ec Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Mar 2023 14:13:18 +0100 Subject: [PATCH] docs: better comments for Cache.find --- lua/lazy/core/cache.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index 8f9bb59..0e6daa2 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -273,7 +273,9 @@ end ---@param opts? ModuleFindOpts (table|nil) Options for finding a module: --- - rtp: (boolean) Search for modname in the runtime path (defaults to `true`) --- - paths: (string[]) Extra paths to search for modname (defaults to `{}`) ---- - patterns: (string[]) Paterns to use (defaults to `{"/init.lua", ".lua"}`) +--- - patterns: (string[]) List of patterns to use when searching for modules. +-- A pattern is a string added to the basename of the Lua module being searched. +-- (defaults to `{"/init.lua", ".lua"}`) -- - all: (boolean) Return all matches instead of just the first one (defaults to `false`) ---@return ModuleInfo[] (list) A list of results with the following properties: --- - modpath: (string) the path to the module