1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
jdhao
a39b53b7c1
Merge pull request #85 from jdhao/packer
update packer conf
2022-08-31 00:02:32 +08:00
jdhao
b9616aeab0 update packer conf 2022-08-31 00:01:38 +08:00

View File

@ -375,12 +375,13 @@ packer.startup({
-- For fresh install, we need to install plugins. Otherwise, we just need to require `packer_compiled.lua`.
if fresh_install then
-- We can command `PackerSync` here, because only after packer.startup, we can know what plugins to install.
-- So plugin install should be done after the startup process.
vim.cmd("PackerSync")
-- We run packer.sync() here, because only after packer.startup, can we know which plugins to install.
-- So plugin installation should be done after the startup process.
packer.sync()
else
local status, _ = pcall(require, 'packer_compiled')
if not status then
vim.notify("Error requiring packer_compiled.lua: run PackerSync to fix!", vim.log.levels.ERROR, { title = 'nvim-config' })
local msg = "File packer_compiled.lua not found: run PackerSync to fix!"
vim.notify(msg, vim.log.levels.ERROR, { title = 'nvim-config' })
end
end