diff options
| author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2026-01-08 04:43:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-07 21:43:55 -0500 |
| commit | 3e83f7bec7789fe584cd939e4a60f270a4c626ff (patch) | |
| tree | ac746bdf9c7423938e6127b8610dd36eb412a005 /runtime/lua/vim/pack.lua | |
| parent | 0bd4d3f779e633feb4da1b43d87d713230ef0eec (diff) | |
| download | rneovim-3e83f7bec7789fe584cd939e4a60f270a4c626ff.tar.gz rneovim-3e83f7bec7789fe584cd939e4a60f270a4c626ff.tar.bz2 rneovim-3e83f7bec7789fe584cd939e4a60f270a4c626ff.zip | |
docs: drop vim.pack WIP note, add example code #37229
Diffstat (limited to 'runtime/lua/vim/pack.lua')
| -rw-r--r-- | runtime/lua/vim/pack.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/lua/vim/pack.lua b/runtime/lua/vim/pack.lua index a2c19b4a5c..13a97fa334 100644 --- a/runtime/lua/vim/pack.lua +++ b/runtime/lua/vim/pack.lua @@ -1,7 +1,7 @@ --- @brief --- ----WORK IN PROGRESS built-in plugin manager! Early testing of existing features ----is appreciated, but expect breaking changes without notice. +--- Install, update, and delete external plugins. WARNING: It is still considered +--- experimental, yet should be stable enough for daily use. --- ---Manages plugins only in a dedicated [vim.pack-directory]() (see |packages|): ---`$XDG_DATA_HOME/nvim/site/pack/core/opt`. `$XDG_DATA_HOME/nvim/site` needs to @@ -149,7 +149,14 @@ ---- Remove plugin specs from |vim.pack.add()| calls in 'init.lua' or they will be --- reinstalled later. ---- |:restart|. ----- Use |vim.pack.del()| with a list of plugin names to remove. +---- Use |vim.pack.del()| with a list of plugin names to remove. Use |vim.pack.get()| +--- to get all non-active plugins: +---```lua +---vim.iter(vim.pack.get()) +--- :filter(function(x) return not x.active end) +--- :map(function(x) return x.spec.name end) +--- :totable() +---``` --- ---[vim.pack-events]() --- @@ -172,6 +179,7 @@ --- --- -- Run build script after plugin's code has changed --- if name == 'plug-1' and (kind == 'install' or kind == 'update') then +--- -- Append `:wait()` if you need synchronous execution --- vim.system({ 'make' }, { cwd = ev.data.path }) --- end --- |