aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/pack.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-01-29 16:55:20 -0500
committerGitHub <noreply@github.com>2026-01-29 16:55:20 -0500
commit52cd9dcff260decda860cf154873b298d10c1208 (patch)
tree4f63b70debb0030c534ff428ccbe163329c4cecb /runtime/lua/vim/pack.lua
parent1a3d3b77bb8d4a4c7b52cbd0b23f6b56772bae0b (diff)
parent164cab405bc68b96db61dabe01d7c53dd5abd53d (diff)
downloadrneovim-52cd9dcff260decda860cf154873b298d10c1208.tar.gz
rneovim-52cd9dcff260decda860cf154873b298d10c1208.tar.bz2
rneovim-52cd9dcff260decda860cf154873b298d10c1208.zip
Merge #37617 from echasnovski/pack-clearer-lockfile-sync
Diffstat (limited to 'runtime/lua/vim/pack.lua')
-rw-r--r--runtime/lua/vim/pack.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/lua/vim/pack.lua b/runtime/lua/vim/pack.lua
index 780e5f278a..b68856a0a6 100644
--- a/runtime/lua/vim/pack.lua
+++ b/runtime/lua/vim/pack.lua
@@ -18,9 +18,10 @@
---located at `$XDG_CONFIG_HOME/nvim/nvim-pack-lock.json`. It is a JSON file that
---is used to persistently track data about plugins.
---For a more robust config treat lockfile like its part: put under version control, etc.
----In this case all plugins from the lockfile will be installed at once and
----at lockfile's revision (instead of inferring from `version`).
----Should not be edited by hand. Corrupted data for installed plugins is repaired
+---In this case all plugins from the lockfile will be installed at once and at lockfile's revision
+---(instead of inferring from `version`). This is done on the very first `vim.pack` function call
+---to ensure that lockfile is aligned with what is actually on the disk.
+---Lockfile should not be edited by hand. Corrupted data for installed plugins is repaired
---(including after deleting whole file), but `version` fields will be missing
---for not yet added plugins.
---
@@ -160,6 +161,7 @@
---
---[vim.pack-events]()
---
+---Performing actions via `vim.pack` functions can trigger these events:
---- [PackChangedPre]() - before trying to change plugin's state.
---- [PackChanged]() - after plugin's state has changed.
---
@@ -195,6 +197,7 @@
---end
---
----- If hooks need to run on install, run this before `vim.pack.add()`
+----- To act on install from lockfile, run before very first `vim.pack.add()`
---vim.api.nvim_create_autocmd('PackChanged', { callback = hooks })
---```