You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
8. [Using a floating window](#using-a-floating-window)
27
+
7.[Lockfile](#lockfile)
28
+
8.[User autocommands](#user-autocommands)
29
+
9.[Using a floating window](#using-a-floating-window)
29
30
7.[Profiling](#profiling)
30
31
8.[Debugging](#debugging)
31
32
9.[Status](#status)
@@ -58,6 +59,7 @@ Have a problem or idea? Make an [issue](https://github.com/wbthomason/packer.nvi
58
59
- Uses jobs for async installation
59
60
- Support for `git` tags, branches, revisions, submodules
60
61
- Support for local plugins
62
+
- Lockfile for for keeping plugins in sync between systems
61
63
62
64
## Requirements
63
65
-**You need to be running Neovim v0.5.0+**; `packer` makes use of extmarks and other newly-added Neovim
@@ -193,8 +195,14 @@ end)
193
195
-- Perform `PackerUpdate` and then `PackerCompile`
194
196
:PackerSync
195
197
198
+
-- Perform `PackerUpdate` without lockfile.
199
+
:PackerUpgrade
200
+
196
201
-- Loads opt plugin immediately
197
202
:PackerLoad completion-nvim ale
203
+
204
+
-- Updates lockfile from installed plugins.
205
+
:PackerLockfile
198
206
```
199
207
200
208
You can configure Neovim to automatically run `:PackerCompile` whenever `plugins.lua` is updated with
@@ -339,6 +347,11 @@ default configuration values (and structure of the configuration table) are:
339
347
prompt_revert='r',
340
348
}
341
349
},
350
+
lockfile= {
351
+
enable=false, -- Should packer apply lockfile to `installer` and `updater`
352
+
path=util.join_paths(stdpath'config', 'lockfile.lua'), -- Default file location for lockfile
353
+
update_on_upgrade=false, -- Should packer update the lockfile after upgrading plugins
354
+
},
342
355
luarocks= {
343
356
python_cmd='python' -- Set the python command to use for running hererocks
344
357
},
@@ -521,7 +534,9 @@ plugins":
521
534
-`packer.update(plugins)`: Update the specified plugins, installing any that are missing
522
535
-`packer.clean()`: Remove any disabled or no longer managed plugins
523
536
-`packer.sync(plugins)`: Perform a `clean` followed by an `update`
537
+
-`packer.upgrade(plugins)`: Performs an `update` without applying the lockfile
524
538
-`packer.compile(path)`: Compile lazy-loader code and save to `path`.
539
+
-`packer.lockfile()`: Updates lockfile based on currently installed plugins
525
540
-`packer.snapshot(snapshot_name, ...)`: Creates a snapshot file that will live under `config.snapshot_path/<snapshot_name>`. If `snapshot_name` is an absolute path, then that will be the location where the snapshot will be taken. Optionally, a list of plugins name can be provided to selectively choose the plugins to snapshot.
526
541
-`packer.rollback(snapshot_name, ...)`: Rollback plugins status a snapshot file that will live under `config.snapshot_path/<snapshot_name>`. If `snapshot_name` is an absolute path, then that will be the location where the snapshot will be taken. Optionally, a list of plugins name can be provided to selectively choose which plugins to revert.
527
542
-`packer.delete(snapshot_name)`: Deletes a snapshot file under `config.snapshot_path/<snapshot_name>`. If `snapshot_name` is an absolute path, then that will be the location where the snapshot will be deleted.
@@ -556,12 +571,18 @@ config/setup functions to bytecode, which has this limitation.
556
571
Additionally, if functions are given for these keys, the functions will be passed the plugin
557
572
name and information table as arguments.
558
573
574
+
### Lockfile
575
+
576
+
`packer` provides a `lockfile` to help manage plugin updates. This is useful for users that store their
577
+
configuration in some sort of source repository. Committing packer's lockfile will ensure that packer will
578
+
`install` and `update` plugins to known working commits for their configuration.
579
+
559
580
### User autocommands
560
581
`packer` runs most of its operations asyncronously. If you would like to implement automations that
561
582
require knowing when the operations are complete, you can use the following `User` autocmds (see
562
583
`:help User` for more info on how to use):
563
584
564
-
-`PackerComplete`: Fires after install, update, clean, and sync asynchronous operations finish.
585
+
-`PackerComplete`: Fires after install, update, clean, sync, and upgrade asynchronous operations finish.
565
586
-`PackerCompileDone`: Fires after compiling (see [the section on compilation](#compiling-lazy-loaders))
0 commit comments