aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
Commit message (Collapse)AuthorAge
* fix(lua): improve annotations for stricter luals diagnostics (#24609)Christian Clason2023-08-09
| | | | | | | | | | | | | | | Problem: luals returns stricter diagnostics with bundled luarc.json Solution: Improve some function and type annotations: * use recognized uv.* types * disable diagnostic for global `vim` in shared.lua * docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type) * add type alias for lpeg pattern * fix return annotation for `vim.secure.trust` * rename local Range object in vim.version (shadows `Range` in vim.treesitter) * fix some "missing fields" warnings * add missing required fields for test functions in eval.lua * rename lsp meta files for consistency
* fix(loader): cache path ambiguity #24491Tyler Miller2023-08-01
| | | | | | | | | | | Problem: cache paths are derived by replacing each reserved/filesystem- path-sensitive char with a `%` char in the original path. With this method, two different files at two different paths (each containing `%` chars) can erroneously resolve to the very same cache path in certain edge-cases. Solution: derive cache paths by url-encoding the original (path) instead using `vim.uri_encode()` with `"rfc2396"`. Increment `Loader.VERSION` to denote this change.
* docs(lua): more improvements (#24387)Lewis Russell2023-07-18
| | | | | | | | | | | | | | | | | * docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* test: spellcheck :help (vimdoc) files #24109Justin M. Keyes2023-06-22
| | | | | | | Enforce consistent terminology (defined in `gen_help_html.lua:spell_dict`) for common misspellings. This does not spellcheck English in general (perhaps a future TODO, though it may be noisy).
* feat(lua): rename vim.loop -> vim.uv (#22846)Lewis Russell2023-06-03
|
* feat(lua): vim.tbl_contains supports general tables and predicates (#23040)Christian Clason2023-04-14
| | | | | | | | | | | | * feat(lua): vim.tbl_contains supports general tables and predicates Problem: `vim.tbl_contains` only works for list-like tables (integer keys without gaps) and primitive values (in particular, not for nested tables). Solution: Rename `vim.tbl_contains` to `vim.list_contains` and add new `vim.tbl_contains` that works for general tables and optionally allows `value` to be a predicate function that is checked for every key.
* fix(loader): reset hashes when running the loaderLewis Russell2023-04-13
|
* docs: fix typosdundargoc2023-04-04
| | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com> Co-authored-by: himanoa <matsunoappy@gmail.com>
* refactor(loader): cache hash informationLewis Russell2023-03-31
| | | | | | | | | | | Whenever we run fs_stat() on a path, save this information in the loader so it can be re-used. - Loader.loadfile: Remove arguments `hash` as it is no longer needed. - Loader.loader: Use _G.loadstring instead of Loader.load This allows plugins to wrap loadstring to inspection and profiling - factor out read file logic
* fix(loader): disable profiling by defaultLewis Russell2023-03-31
|
* refactor(loader): simplify tracking logicLewis Russell2023-03-26
|
* feat(vim.fs): improve normalizeLewis Russell2023-03-26
| | | | | | - Add options argument with an option to expand env vars - Resolve '//' -> '/' - Use in vim.loader
* refactor(loader): add typing for package.loadersLewis Russell2023-03-26
|
* refactor(loader): remove BufWritePost autocmdLewis Russell2023-03-26
|
* refactor(loader): use vim.fsLewis Russell2023-03-26
|
* feat(lua): add `vim.loader`Folke Lemaitre2023-03-26
feat: new faster lua loader using byte-compilation