Browse Source

fix: packpath error on first run (#139)

packadd command not working because it was not installed on first run.

Co-authored-by: Christian Chiarulli <chrisatmachine@gmail.com>
michaelslec 4 years ago
parent
commit
ab661fb3b8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lua/plugins.lua

+ 2 - 2
lua/plugins.lua

@@ -1,3 +1,5 @@
+vim.cmd [[packadd packer.nvim]]
+
 local execute = vim.api.nvim_command
 local fn = vim.fn
 
@@ -8,8 +10,6 @@ if fn.empty(fn.glob(install_path)) > 0 then
     execute 'packadd packer.nvim'
 end
 
-vim.cmd [[packadd packer.nvim]]
-
 vim.cmd 'autocmd BufWritePost plugins.lua PackerCompile' -- Auto compile when there are changes in plugins.lua
 
 return require('packer').startup(function(use)