Skip to content

Commit

Permalink
docs(fs.lua): find predicate add parameters description
Browse files Browse the repository at this point in the history
Co-authored-by: Justin M. Keyes <[email protected]>
  • Loading branch information
mike325 and justinmk committed Mar 1, 2023
1 parent b366d56 commit c4c0547
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions runtime/doc/lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2384,11 +2384,12 @@ find({names}, {opts}) *vim.fs.find()*
{names} (string|table|fun(name: string, path: string): boolean) Names
of the files and directories to find. Must be base names,
paths and globs are not supported when {names} is a string or
a table. If {names} is a function, it will be called once for
each file or directory within the traversed directory with
the base name of the file and directory and the path of the
directory being traversed. The function should return `true`
if the given file or directory is considered a match.
a table. If {names} is a function, it is called for each
traversed file and directory with args:
• name: base name of the current item
• path: full path of the current item The function should
return `true` if the given file or directory is considered
a match.
{opts} (table) Optional keyword arguments:
• path (string): Path to begin searching from. If omitted,
the |current-directory| is used.
Expand Down
6 changes: 3 additions & 3 deletions runtime/lua/vim/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ end
---@param names (string|table|fun(name: string, path: string): boolean) Names of the files
--- and directories to find.
--- Must be base names, paths and globs are not supported when {names} is a string or a table.
--- If {names} is a function, it will be called once for each file or directory
--- within the traversed directory with the base name of the
--- file and directory and the path of the directory being traversed.
--- If {names} is a function, it is called for each traversed file and directory with args:
--- - name: base name of the current item
--- - path: full path of the current item
--- The function should return `true` if the given file or directory is considered a match.
---
---@param opts (table) Optional keyword arguments:
Expand Down

0 comments on commit c4c0547

Please sign in to comment.