mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 03:16:31 +00:00
feat(pack): prefer using revision from lockfile during install
Problem: Installing plugin always pulls latest `version` changes (usually from the default branch or "latest version tag"). It is more robust to prefer initial installation to use the latest recorded (i.e. "working") revision. Solution: Prefer using revision from the lockfile (if present) during install. The extra `update()` will pull the latest changes.
This commit is contained in:
@@ -224,8 +224,9 @@ tags following semver convention `v<major>.<minor>.<patch>`.
|
||||
The latest state of all managed plugins is stored inside a *vim.pack-lockfile*
|
||||
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. Should not be
|
||||
edited by hand or deleted.
|
||||
treat lockfile like its part: put under version control, etc. In this case
|
||||
initial install prefers revision from the lockfile instead of inferring from
|
||||
`version`. Should not be edited by hand or deleted.
|
||||
|
||||
Example workflows ~
|
||||
|
||||
@@ -260,7 +261,8 @@ Basic install and management:
|
||||
plugin1 = require('plugin1')
|
||||
<
|
||||
• Restart Nvim (for example, with |:restart|). Plugins that were not yet
|
||||
installed will be available on disk in target state after `add()` call.
|
||||
installed will be available on disk after `add()` call. Their revision is
|
||||
taken from |vim.pack-lockfile| (if present) or inferred from the `version`.
|
||||
• To update all plugins with new changes:
|
||||
• Execute |vim.pack.update()|. This will download updates from source and
|
||||
show confirmation buffer in a separate tabpage.
|
||||
|
Reference in New Issue
Block a user