added bootstrapping for packer

This commit is contained in:
Thies Lennart Alff 2023-08-23 16:05:08 +02:00
parent ee04d17674
commit b4b83fcef5
2 changed files with 21 additions and 4 deletions

View file

@ -1,4 +1,16 @@
vim.cmd [[packadd packer.nvim]] -- packer bootstrapping
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) return require('packer').startup(function(use)
-- Packer can manage itself -- Packer can manage itself

View file

@ -89,6 +89,11 @@ _G.packer_plugins = {
path = "/home/lennartalff/.local/share/nvim/site/pack/packer/start/formatter.nvim", path = "/home/lennartalff/.local/share/nvim/site/pack/packer/start/formatter.nvim",
url = "https://github.com/mhartington/formatter.nvim" url = "https://github.com/mhartington/formatter.nvim"
}, },
["gitsigns.nvim"] = {
loaded = true,
path = "/home/lennartalff/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
url = "https://github.com/lewis6991/gitsigns.nvim"
},
["lsp-zero.nvim"] = { ["lsp-zero.nvim"] = {
loaded = true, loaded = true,
path = "/home/lennartalff/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", path = "/home/lennartalff/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",