summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/fs.lua
AgeCommit message (Collapse)AuthorFiles
2023-06-18fix(fs): make `normalize()` work with '/' path (#24047)Evgeni Chasnovski1
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>
2023-06-10docs: fix typos (#23917)Jonas Strittmatter1
2023-06-03feat(lua): rename vim.loop -> vim.uv (#22846)Lewis Russell1
2023-05-20feat(fs): expose join_paths as `vim.fs.joinpath` (#23685)Christian Clason1
This is a small function but used a lot in some plugins.
2023-05-17feat(treesitter): improved logging (#23638)Lewis Russell1
- Add bindings to Treesitter ts_parser_set_logger and ts_parser_logger - Add logfile with path STDPATH('log')/treesitter.c - Rework existing LanguageTree loggin to use logfile - Begin implementing log levels for vim.g.__ts_debug
2023-04-04fix(windows): consistent normalization in fs.finddundargoc1
vim.fs.find(".luacheckrc") ``` c:\\projects\\neovim/.luacheckrc # before c:/projects/neovim/.luacheckrc # after ``` Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
2023-03-26feat(vim.fs): improve normalizeLewis Russell1
- Add options argument with an option to expand env vars - Resolve '//' -> '/' - Use in vim.loader
2023-03-26refactor(loader): use vim.fsLewis Russell1
2023-03-01feat(vim.fs): pass path to find() predicate, lazy evaluate #22378Mike1
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.
2023-01-25docs(vim.fs): normalize Windows example was incorrect (#21966)C.D. MacEachern1
2023-01-03fix(fs): duplicate path separator #21509Eric Haynes1
Fixes #21497
2022-12-20feat(fs): add opts argument to vim.fs.dir()Lewis Russell1
Added option depth to allow recursively searching a directory tree.
2022-12-02Merge pull request #21154 from clason/vimdoc-injectionsChristian Clason1
feat(help): highlighted codeblocks
2022-12-02docs(gen): support language annotation in docstringsChristian Clason1
2022-12-01refactor(fs): replace vim.fn/vim.env in vim.fs (#20379)Mike1
Avoid using vim.env and vim.fn in vim.fs functions so that they can be used in "fast" contexts.
2022-11-26docs: fix typos (#21168)dundargoc1
2022-11-24docs(lua): add clarifications for fs.find() and fs.normalize() (#21132)AzerAfram1
Co-Authored-By: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-Authored-By: zeertzjq <zeertzjq@outlook.com>
2022-09-13feat(fs): extend fs.find to accept predicate (#20193)Mathias Fußenegger1
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 })
2022-07-07refactor(lua): reformat with stylua 0.14.0 (#19264)Christian Clason1
* reformat Lua runtime to make lint CI pass * reduce max line length to 100
2022-06-03feat(lsp): add a start function (#18631)Mathias Fußenegger1
A alternative/subset of https://github.com/neovim/neovim/pull/18506 that should be forward compatible with a potential project system. Configuration of LSP clients (without lspconfig) now looks like this: vim.lsp.start({ name = 'my-server-name', cmd = {'name-of-language-server-executable'}, root_dir = vim.fs.dirname(vim.fs.find({'setup.py', 'pyproject.toml'}, { upward = true })[1]), })
2022-05-31feat(fs): add vim.fs.normalize()Gregory Anders1
2022-05-31feat(fs): add vim.fs.find()Gregory Anders1
This is a pure Lua implementation of the Vim findfile() and finddir() functions without the special syntax.
2022-05-31feat(fs): add vim.fs.dir()Gregory Anders1
This function is modeled after the path.dir() function from Penlight and the luafilesystem module.
2022-05-31feat(fs): add vim.fs.basename()Gregory Anders1
2022-05-31feat(fs): add vim.fs.dirname()Gregory Anders1
2022-05-31feat(fs): add vim.fs.parents()Gregory Anders1
vim.fs.parents() is a Lua iterator that returns the next parent directory of the given file or directory on each iteration.