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')