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

Merge pull request #85 from jdhao/packer

update packer conf
This commit is contained in:
jdhao 2022-08-31 00:02:32 +08:00 committed by GitHub
commit a39b53b7c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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