summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugin-loader.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugin-loader.lua')
-rw-r--r--.config/nvim/lua/plugin-loader.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/.config/nvim/lua/plugin-loader.lua b/.config/nvim/lua/plugin-loader.lua
index cbe849b..fed4995 100644
--- a/.config/nvim/lua/plugin-loader.lua
+++ b/.config/nvim/lua/plugin-loader.lua
@@ -1,13 +1,15 @@
local plugin_loader = {}
function plugin_loader:init()
- local execute = vim.api.nvim_command
- local fn = vim.fn
-
local install_path = "~/.local/share/nvim/site/pack/packer/start/packer.nvim"
- if fn.empty(fn.glob(install_path)) > 0 then
- execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
- execute "packadd packer.nvim"
+ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
+ vim.fn.system {
+ "git",
+ "clone",
+ "https://github.com/wbthomason/packer.nvim",
+ install_path,
+ }
+ vim.cmd "packadd packer.nvim"
end
local packer_ok, packer = pcall(require, "packer")