fix(install): dont load the colorscheme again if a `config()` of the colorscheme also loads it. Fixes #488

This commit is contained in:
Folke Lemaitre 2023-02-07 22:59:05 +01:00
parent 48c9b37294
commit 49b43def14
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ function M.install_missing()
for _, plugin in pairs(Config.plugins) do
if not (plugin._.installed or Plugin.has_errors(plugin)) then
for _, colorscheme in ipairs(Config.options.install.colorscheme) do
if pcall(vim.cmd.colorscheme, colorscheme) then
M.colorscheme(colorscheme)
if vim.g.colors_name or pcall(vim.cmd.colorscheme, colorscheme) then
break
end
end