Commit Graph

6 Commits

Author SHA1 Message Date
Evgeni Chasnovski
3f34f083db fix(pack): ignore 'loadplugins' when sourcing 'after/plugin' scripts
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.
2025-08-02 15:00:41 +03:00
Evgeni Chasnovski
28e2a5c151 fix(pack): improve vim.pack.add() input validation 2025-08-02 15:00:41 +03:00
Evgeni Chasnovski
1ee18b4061 fix(pack): use 'coxpcall.lua' on non-LuaJIT
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.
2025-08-02 15:00:41 +03:00
György Andorka
46648c3867 fix(pack): close confirmation buffer's tabpage by ID #34971
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.
2025-07-18 18:40:16 -07:00
Phạm Bình An
12689c73d8 fix(vim.pack): add() stops unexpectedly on package load error #34787
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>
2025-07-06 11:04:03 -07:00
Evgeni Chasnovski
d21b8c949a feat(pack): add built-in plugin manager vim.pack
Problem: No built-in plugin manager

Solution: Add built-in plugin manager

Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2025-07-04 15:56:28 +03:00