From 4a076eacd959996877c26b55319f082a01545a69 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 28 Feb 2022 14:30:23 +0100 Subject: [PATCH] Set snapshot path of packer --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 744e340..fbce782 100644 --- a/init.lua +++ b/init.lua @@ -3,6 +3,7 @@ local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local opt = vim.opt -- to set options local utils = require('utils') +local packerUtil = require'packer.util' -------------------- PACKER -------------------------------- -- Auto install packer.nvim if not exists @@ -12,6 +13,9 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.cmd 'packadd packer.nvim' end vim.cmd [[packadd packer.nvim]] +require('packer').init({ + snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots') +}) -------------------- EXTERNAL ------------------------------ require('my_plugins') require('my_keymappings')