aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-11-21 15:45:34 +0800
committerjdhao <jdhao@hotmail.com>2021-11-21 15:45:34 +0800
commit927a57452c3a9c1d7c8632cae1a580f2df9cc908 (patch)
treec054067a2e4b63170ed8ba00aa7ac69a2db608eb
parentaf17364730f73f30442c33921b2e55f9a3147f24 (diff)
update packer-related instructions
-rw-r--r--core/plugins.vim2
-rw-r--r--docs/README.md7
-rwxr-xr-xdocs/nvim_setup_linux.sh2
-rw-r--r--lua/plugins.lua5
4 files changed, 10 insertions, 6 deletions
diff --git a/core/plugins.vim b/core/plugins.vim
index dc2e6c7..9fbea39 100644
--- a/core/plugins.vim
+++ b/core/plugins.vim
@@ -493,6 +493,6 @@ function! s:wilder_init() abort
\ 'apply_incsearch_fix': 0,
\ }))
catch /^Vim\%((\a\+)\)\=:E117/
- echohl Error |echomsg "Wilder.nvim missing. Run :PackerInstall to install all plugins."|echohl None
+ echohl Error |echomsg "Wilder.nvim missing. Run :PackerSync to install all plugins."|echohl None
endtry
endfunction
diff --git a/docs/README.md b/docs/README.md
index d67db69..526de9d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -205,9 +205,10 @@ directory, and run the following command to install this configuration:
git clone --depth=1 https://github.com/jdhao/nvim-config.git .
```
-After that, when we first open nvim, run command `:PackerInstall` to install
-all the plugins. Since I use quite a lot of plugins (more than 60), it may take
-some time to install all of them, depending on your network condition.
+After that, when we first open nvim, run command `:PackerSync` to install all
+the plugins and generate `packer_compiled.lua`. Since I use quite a lot of
+plugins (more than 60), it may take some time to install all of them, depending
+on your network condition.
# Automatic installation
diff --git a/docs/nvim_setup_linux.sh b/docs/nvim_setup_linux.sh
index 32fd4dd..81990b1 100755
--- a/docs/nvim_setup_linux.sh
+++ b/docs/nvim_setup_linux.sh
@@ -212,6 +212,6 @@ git clone --depth=1 https://hub.fastgit.org/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/start/packer.nvim
echo "Installing plugins"
-"$NVIM_DIR/bin/nvim" +PackerInstall +qall
+"$NVIM_DIR/bin/nvim" +PackerSync +qall
echo "Finished installing Nvim and its dependencies!"
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 30d3254..a406509 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -328,4 +328,7 @@ require("packer").startup({
},
})
-require('packer_compiled')
+local status, _ = pcall(require, 'packer_compiled')
+if not status then
+ vim.notify("You should run command PackerCompile")
+end