aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/fs.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-03-06 10:03:55 +0000
committerLewis Russell <me@lewisr.dev>2024-03-06 10:45:22 +0000
commitea44f74d84f87ce5aff2ef7797be986900bd74a6 (patch)
treee726c49d53d6a2a4b1be85f0df2fd4eccebc026e /runtime/lua/vim/fs.lua
parentd72c9d1d194fd050c3f5e95a6b5c319a8afa1a8f (diff)
downloadrneovim-ea44f74d84f87ce5aff2ef7797be986900bd74a6.tar.gz
rneovim-ea44f74d84f87ce5aff2ef7797be986900bd74a6.tar.bz2
rneovim-ea44f74d84f87ce5aff2ef7797be986900bd74a6.zip
refactor(types): more fixes
Diffstat (limited to 'runtime/lua/vim/fs.lua')
-rw-r--r--runtime/lua/vim/fs.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua
index a47b35e991..28a531707f 100644
--- a/runtime/lua/vim/fs.lua
+++ b/runtime/lua/vim/fs.lua
@@ -152,25 +152,25 @@ end
---
--- Path to begin searching from. If
--- omitted, the |current-directory| is used.
---- @field path string
+--- @field path? string
---
--- Search upward through parent directories.
--- Otherwise, search through child directories (recursively).
--- (default: `false`)
---- @field upward boolean
+--- @field upward? boolean
---
--- Stop searching when this directory is reached.
--- The directory itself is not searched.
---- @field stop string
+--- @field stop? string
---
--- Find only items of the given type.
--- If omitted, all items that match {names} are included.
---- @field type string
+--- @field type? string
---
--- Stop the search after finding this many matches.
--- Use `math.huge` to place no limit on the number of matches.
--- (default: `1`)
---- @field limit number
+--- @field limit? number
--- Find files or directories (or other items as specified by `opts.type`) in the given path.
---
@@ -229,7 +229,7 @@ function M.find(names, opts)
names = { names }
end
- local path = opts.path or vim.uv.cwd()
+ local path = opts.path or assert(vim.uv.cwd())
local stop = opts.stop
local limit = opts.limit or 1