local ensure_packer = function() local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.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() require('packer').startup(plugins) if packer_bootstrap then require('packer').sync() return true end return false