fix: temporary colorscheme should only load when installing

This commit is contained in:
Folke Lemaitre 2022-12-02 22:45:33 +01:00
parent 7ec65e4cd9
commit ec858db225
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 5 additions and 6 deletions

View File

@ -11,14 +11,13 @@ function M.setup()
-- install missing plugins
if Config.options.install.missing then
Util.track("install")
for _, colorscheme in ipairs(Config.options.install.colorscheme) do
if pcall(vim.cmd.colorscheme, colorscheme) then
break
end
end
for _, plugin in pairs(Config.plugins) do
if not plugin._.installed then
vim.cmd("do User LazyInstallPre")
for _, colorscheme in ipairs(Config.options.install.colorscheme) do
if pcall(vim.cmd.colorscheme, colorscheme) then
break
end
end
require("lazy.manage").install({ wait = true })
break
end