From 7ecd402ea2d42bf5663b543e6f3b296a9d219bfd Mon Sep 17 00:00:00 2001 From: Ian Mancini Date: Mon, 6 Sep 2021 18:17:23 -0300 Subject: [PATCH] Fix packer.nvim --- filesets/base/nvim/.config/nvim/init.lua | 12 ++++-------- filesets/base/nvim/.config/nvim/lua/plugins/init.lua | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/filesets/base/nvim/.config/nvim/init.lua b/filesets/base/nvim/.config/nvim/init.lua index 55e8a92..a0022a9 100644 --- a/filesets/base/nvim/.config/nvim/init.lua +++ b/filesets/base/nvim/.config/nvim/init.lua @@ -1,17 +1,13 @@ vim.g.python3_host_prog = '/usr/bin/python' vim.g.mapleader = ' ' -local fn = vim.fn -local execute = vim.api.nvim_command - -- Setup packer -local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' +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 - execute('!git clone https://github.com/wbthomason/packer.nvim '..install_path) + fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd 'packadd packer.nvim' end -vim.cmd [[packadd packer.nvim]] - -vim.cmd 'autocmd BufWritePost plugins/init.lua PackerCompile' -- Auto compile when there are changes in plugins.lua -- Source settings require('plugins') diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/init.lua b/filesets/base/nvim/.config/nvim/lua/plugins/init.lua index b230c2f..c0f0bb5 100644 --- a/filesets/base/nvim/.config/nvim/lua/plugins/init.lua +++ b/filesets/base/nvim/.config/nvim/lua/plugins/init.lua @@ -1,7 +1,7 @@ ---@diagnostic disable: undefined-global return require('packer').startup(function() - use {'wbthomason/packer.nvim', opt = true} + use 'wbthomason/packer.nvim' use {'ibhagwan/fzf-lua', requires = {