fix: use correct install path for packer (#1540)

This commit is contained in:
kylo252 2021-09-13 17:22:27 +02:00 committed by GitHub
parent bb130d669b
commit 414777077f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -3,11 +3,12 @@ local plugin_loader = {}
function plugin_loader:init(opts)
opts = opts or {}
local install_path = opts.install_path or vim.fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
local package_root = opts.package_root or vim.fn.stdpath "data" .. "/site/pack"
local compile_path = opts.compile_path or vim.fn.stdpath "config" .. "/plugin/packer_compile.lua"
if vim.fn.empty(vim.fn.glob(package_root)) > 0 then
vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", package_root }
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"
end