Added base folke setup
This commit is contained in:
@@ -5,13 +5,12 @@ local M = {}
|
||||
M.local_plugins = {}
|
||||
|
||||
function M.bootstrap()
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/opt/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})
|
||||
return true
|
||||
end
|
||||
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/opt/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 })
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function M.auto_compile()
|
||||
@@ -102,26 +101,27 @@ function M.plugin(pkg)
|
||||
end
|
||||
|
||||
function M.setup(config, fn)
|
||||
local bootstrapped = M.bootstrap()
|
||||
M.auto_compile()
|
||||
vim.fn.setenv("MACOSX_DEPLOYMENT_TARGET", "10.15")
|
||||
local bootstrapped = M.bootstrap()
|
||||
M.auto_compile()
|
||||
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
|
||||
local packer = require("packer")
|
||||
packer.init(config)
|
||||
local packer = require("packer")
|
||||
packer.init(config)
|
||||
|
||||
M.local_plugins = config.local_plugins or {}
|
||||
M.local_plugins = config.local_plugins or {}
|
||||
|
||||
packer.startup(function(use)
|
||||
use = M.wrap(use)
|
||||
fn(use, function(pkg)
|
||||
return use(M.plugin(pkg))
|
||||
end)
|
||||
end)
|
||||
packer.startup(function(use)
|
||||
use = M.wrap(use)
|
||||
fn(use, function(pkg)
|
||||
return use(M.plugin(pkg))
|
||||
end)
|
||||
end)
|
||||
|
||||
if bootstrapped then
|
||||
require("packer").sync()
|
||||
end
|
||||
if bootstrapped then
|
||||
require("packer").sync()
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
Reference in New Issue
Block a user