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 -- install missing plugins
if Config.options.install.missing then if Config.options.install.missing then
Util.track("install") Util.track("install")
for _, plugin in pairs(Config.plugins) do
if not plugin._.installed then
for _, colorscheme in ipairs(Config.options.install.colorscheme) do for _, colorscheme in ipairs(Config.options.install.colorscheme) do
if pcall(vim.cmd.colorscheme, colorscheme) then if pcall(vim.cmd.colorscheme, colorscheme) then
break break
end end
end end
for _, plugin in pairs(Config.plugins) do
if not plugin._.installed then
vim.cmd("do User LazyInstallPre")
require("lazy.manage").install({ wait = true }) require("lazy.manage").install({ wait = true })
break break
end end