aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/pack.lua
Commit message (Collapse)AuthorAge
...
* fix(pack): ensure explicit default `version` in events (where possible)Evgeni Chasnovski2025-08-02
| | | | | | | | | | | | | | | | | | | | | | Problem: Both `PackChangedPre` and `PackChanged` contain |event-data| with plugin's `spec`. It looks like a good idea to have all its triggers contain the same format across all kinds ("install", "update", "delete"). There are several choices: - Have it be as verbatim as supplied to `vim.pack.add()`, i.e. can be either string or table. A bit too ambiguous. - Have it be table with `src` and `name` inferred. This requires less work for "install", but more work for "update" and "delete" (since they use `vim.pack.get()` which already infers default `version`). - Have it be table with *all* defaults made explicit. This looks like the best approach, but requires extra care to only infer default `version` when needed (i.e. avoid inferring during regular load) because it is costly in terms of startup time. This might also introduce inconsistency when dealing with lockfile(s) as information there should be as close to what user supplied as possible. Address that when dealing with lockfile. Solution: Ensure explicit `version` in all events where possible.
* fix(pack): use `vim.pack:` as message/progress prefixEvgeni Chasnovski2025-08-02
|
* fix(pack): validate installed plugins in `update()` and `del()`Evgeni Chasnovski2025-08-02
| | | | | | | | | Problem: Currently `update()` and `del()` silently ignore input plugin names that are not for already installed plugin. This might lead to confusion because they are not explicitly reported. Solution: Check that all input names are for installed plugins and error otherwise.
* feat(pack): use colored `nvim_echo` chunks to show progress reportEvgeni Chasnovski2025-08-02
| | | | | | | | Problem: using `print()` to show progress report writes to `stdout` when in `--headless` mode (interferes with the testing output) and doesn't allow coloring. Solution: use `nvim_echo` with colored chunks.
* fix(pack): ignore 'loadplugins' when sourcing 'after/plugin' scriptsEvgeni Chasnovski2025-08-02
| | | | | | | | | Problem: Sourcing of 'after/plugin' scripts depends on the value of 'loadplugins' option. It is redundant, as it has effect only during startup, while it is combined with `vim.v.vim_did_enter == 1` (i.e. "it is after starting up") condition. Solution: Ignore it.
* fix(pack): improve `vim.pack.add()` input validationEvgeni Chasnovski2025-08-02
|
* fix(pack): use 'coxpcall.lua' on non-LuaJITEvgeni Chasnovski2025-08-02
| | | | | | | | Problem: `attempt to yield across metamethod/C-call boundary` error when trying to use `vim.pack.add()`. Solution: use `pcall()` variant from 'coxpcall' on non-LuaJIT version of Lua.
* fix(pack): close confirmation buffer's tabpage by ID #34971György Andorka2025-07-18
| | | | | | | | | Problem: On canceling the update (triggering `WinClosed`), the tab page will most probably be closed too. Closing some other tab page while the confirmation buffer is open also changes tab page numbers. We are trying to close the wrong tab page in both cases. Solution: save the tab page ID, and attempt to get the tab page number from the ID when closing the buffer.
* fix(vim.pack): add() stops unexpectedly on package load error #34787Phạm Bình An2025-07-06
| | | | | | | | | | | Problem: Error when adding a plugin will make all following plugins not `:packadd`ed Solution: - add() should handle errors from :packadd with pcall() Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* feat(pack): add built-in plugin manager `vim.pack`Evgeni Chasnovski2025-07-04
Problem: No built-in plugin manager Solution: Add built-in plugin manager Co-authored-by: Lewis Russell <lewis6991@gmail.com>