From 37714095b484f688e54c03dc99ca42e1f95ed3e3 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 8 Mar 2023 14:39:00 -0800 Subject: [PATCH] Set snapshot based on vim version --- neovim/lua/plugins.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index 33be0bb..474999a 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -23,7 +23,11 @@ local use = packer.use packer.init({ -- Always load default - snapshot = "latest", + snapshot = utils.map_version_rule({ + [">=0.8.0"] = "latest-0.8", + [">=0.7.0"] = "latest-0.7", + [">=0.5.0"] = "latest", + }), snapshot_path = packer_util.join_paths(vim.fn.stdpath("config"), "packer_snapshots"), display = { open_fn = function()