From 42e9d8dfd1056e99713cb3f8a0155d1555cf896d Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Thu, 16 Apr 2026 17:33:20 +0300 Subject: [PATCH] docs(pack): improve "Synchronize across machines" steps #39122 Problem: Sometimes automatic lockfile synchronization after `:restart` might fail, like due to bad/absent Internet connection. This would remove failed to install entries from the lockfile (since they are not on disk and lockfile is meant to lock the latest plugin version on disk). Solution: Document that this should be treated as an unwanted update and use steps similar to "Revert plugin after an update" use case. --- runtime/doc/pack.txt | 4 +++- runtime/lua/vim/pack.lua | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/doc/pack.txt b/runtime/doc/pack.txt index 11f55d4b8d..f5e2c2fc6e 100644 --- a/runtime/doc/pack.txt +++ b/runtime/doc/pack.txt @@ -334,7 +334,9 @@ Synchronize config across machines ~ • On secondary machine: • Pull from the server. • |:restart|. New plugins (not present locally, but present in the lockfile) - are installed at proper revision. + are installed at proper revision. If some installation has failed but you + know it should not (like due to bad Internet connection), revert + |vim.pack-lockfile| and |:restart| again. • `vim.pack.update(nil, { target = 'lockfile' })`. Read and confirm. • Manually delete outdated plugins (present locally, but were not present in the lockfile prior to restart) with `vim.pack.del( { 'plugin' })`. They diff --git a/runtime/lua/vim/pack.lua b/runtime/lua/vim/pack.lua index f69a096ace..60b1680f7f 100644 --- a/runtime/lua/vim/pack.lua +++ b/runtime/lua/vim/pack.lua @@ -138,7 +138,9 @@ ---- On secondary machine: --- - Pull from the server. --- - |:restart|. New plugins (not present locally, but present in the lockfile) ---- are installed at proper revision. +--- are installed at proper revision. If some installation has failed but +--- you know it should not (like due to bad Internet connection), +--- revert |vim.pack-lockfile| and |:restart| again. --- - `vim.pack.update(nil, { target = 'lockfile' })`. Read and confirm. --- - Manually delete outdated plugins (present locally, but were not present --- in the lockfile prior to restart) with `vim.pack.del( { 'plugin' })`.