aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/fs_spec.lua
Commit message (Collapse)AuthorAge
* test(windows): unskip working tests (#25153)dundargoc2023-09-15
| | | Also simplify home detection with os_homedir()
* fix(fs.lua): normalize slash truncation (#23753)Mike2023-07-18
| | | Preserve last slash in windows' root drive directories
* fix(fs): make `normalize()` work with '/' path (#24047)Evgeni Chasnovski2023-06-18
| | | | | | | Problem: Current implementation of "remove trailing /" doesn't account for the case of literal '/' as path. Solution: Remove trailing / only if it preceded by something else. Co-authored by: notomo <notomo.motono@gmail.com>
* feat(fs): expose join_paths as `vim.fs.joinpath` (#23685)Christian Clason2023-05-20
| | | This is a small function but used a lot in some plugins.
* build: bundle uncrustifydundargoc2023-05-18
| | | | | | Uncrustify is sensitive to version changes, which causes friction for contributors that doesn't have that exact version. It's also simpler to download and install the correct version than to have bespoke version checking.
* test(vim.fs.normalize): enable test on Windowsdundargoc2023-04-05
|
* test: replace lfs with luv and vim.fsdundargoc2023-04-04
| | | | | | test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed.
* test: don't search entire repo for filesdundargoc2023-03-05
| | | | | Searching the entire repo for a directory named "contrib" causes failure if there happens to be another subdirectory with the name "contrib". Instead, point directly to the correct contrib directory.
* feat(vim.fs): pass path to find() predicate, lazy evaluate #22378Mike2023-03-01
| | | | | | | | Problem: No easy way to find files under certain directories (ex: grab all files under `test/`) or exclude the content of certain paths (ex. `build/`, `.git/`) Solution: Pass the full `path` as an arg to the predicate.
* fix(fs): duplicate path separator #21509Eric Haynes2023-01-03
| | | Fixes #21497
* test(lua/fs_spec): fix vim.fs.dir() test (#21503)zeertzjq2022-12-22
|
* fix(ci): skip test on windows (#21502)Lewis Russell2022-12-22
|
* feat(fs): add opts argument to vim.fs.dir()Lewis Russell2022-12-20
| | | | Added option depth to allow recursively searching a directory tree.
* refactor(fs): replace vim.fn/vim.env in vim.fs (#20379)Mike2022-12-01
| | | | Avoid using vim.env and vim.fn in vim.fs functions so that they can be used in "fast" contexts.
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* feat(fs): extend fs.find to accept predicate (#20193)Mathias Fußenegger2022-09-13
| | | | | | | | | | | | | Makes it possible to use `vim.fs.find` to find files where only a substring is known. This is useful for `vim.lsp.start` to get the `root_dir` for languages where the project-file is only known by its extension, not by the full name. For example in .NET projects there is usually a `<projectname>.csproj` file in the project root. Example: vim.fs.find(function(x) return vim.endswith(x, '.csproj') end, { upward = true })
* feat(fs): add vim.fs.normalize()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.find()Gregory Anders2022-05-31
| | | | | This is a pure Lua implementation of the Vim findfile() and finddir() functions without the special syntax.
* feat(fs): add vim.fs.dir()Gregory Anders2022-05-31
| | | | | This function is modeled after the path.dir() function from Penlight and the luafilesystem module.
* feat(fs): add vim.fs.basename()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.dirname()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.parents()Gregory Anders2022-05-31
vim.fs.parents() is a Lua iterator that returns the next parent directory of the given file or directory on each iteration.