mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-19 08:49:00 +02:00
fix: use correct install path for packer (#1540)
This commit is contained in:
parent
bb130d669b
commit
414777077f
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue