diff options
| author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2026-07-31 15:17:00 +0300 |
|---|---|---|
| committer | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2026-07-31 19:20:34 +0300 |
| commit | 9d12df0398499d22bb509ad5c209dd608095596d (patch) | |
| tree | c885120cf28814654dc92727a1c934f6164e22e1 /runtime/plugin/python_setup.vim | |
| parent | 4cdd6d76c5ad2714aa5c056c8b16fca408120e61 (diff) | |
| download | rneovim-9d12df0398499d22bb509ad5c209dd608095596d.tar.gz rneovim-9d12df0398499d22bb509ad5c209dd608095596d.tar.bz2 rneovim-9d12df0398499d22bb509ad5c209dd608095596d.zip | |
feat(pack): add support for sourcing manifest scripts
Problem: No way for plugins to define hooks that would be executed
during plugin lifecycle. Like after install/update or before
update/delete.
Solution: Automatically source scripts defined in plugin manifest file
(if any) after triggering corresponding `PackChanged{,Pre}` events.
During sourcing make some termporary adjustments:
- Current directory is set to plugin's root to simplify execution of
CLI calls like `make build`.
- Plugin's path is ensured to be inside 'runtimepath' to allow using
`require('plugin-module')` inside manifest scripts.
The reason to execute after triggering event is so that there is a
possibility for users to execute code both before the script (exactly
on event) and after the script (more-or-less via `vim.schedule` called
on the event).
Diffstat (limited to 'runtime/plugin/python_setup.vim')
0 files changed, 0 insertions, 0 deletions