diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-09-06 21:53:56 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-09-06 21:53:56 +0200 |
commit | 6a1732982287ef5aff2a6de171192b9e2bb90758 (patch) | |
tree | 543f94f80d548b9ed7a9d0daecb08575a01a9a45 /.config/nvim/lua/plugin-loader.lua | |
parent | b89e893bfc7b8893dc4c13aa55f627096b32758a (diff) |
Updates to nvim from lvim
Diffstat (limited to '.config/nvim/lua/plugin-loader.lua')
-rw-r--r-- | .config/nvim/lua/plugin-loader.lua | 14 |
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") |