diff options
Diffstat (limited to '')
-rw-r--r-- | nvim/lua/lemon/packer.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nvim/lua/lemon/packer.lua b/nvim/lua/lemon/packer.lua index 5024f8c..d63cadc 100644 --- a/nvim/lua/lemon/packer.lua +++ b/nvim/lua/lemon/packer.lua @@ -1,7 +1,20 @@ -- This file can be loaded by calling `lua require('plugins')` from your init.vim -- Only required if you have packer configured as `opt` -vim.cmd.packadd('packer.nvim') +--vim.cmd.packadd('packer.nvim') + +local ensure_packer = function() + local fn = vim.fn + local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd [[packadd packer.nvim]] + return true + end + return false +end + +local packer_bootstrap = ensure_packer() return require('packer').startup(function(use) -- Packer can manage itself |