mirror of https://github.com/folke/lazy.nvim.git
feat: temporary colorscheme to use during install during startup
This commit is contained in:
parent
0ba218a065
commit
7ec65e4cd9
|
@ -10,7 +10,6 @@ M.defaults = {
|
|||
-- version = "*", -- enable this to try installing the latest stable versions of plugins
|
||||
},
|
||||
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update.
|
||||
install_missing = true, -- install missing plugins on startup. This doesn't increase startup time.
|
||||
concurrency = nil, -- set to a number to limit the maximum amount of concurrent tasks
|
||||
git = {
|
||||
-- defaults for `Lazy log`
|
||||
|
@ -30,6 +29,13 @@ M.defaults = {
|
|||
---@type string[]
|
||||
patterns = {}, -- For example {"folke"}
|
||||
},
|
||||
install = {
|
||||
-- install missing plugins on startup. This doesn't increase startup time.
|
||||
missing = true,
|
||||
-- try to load one of the colorschemes in this list when starting an install during startup
|
||||
-- the first colorscheme that is found will be used
|
||||
colorscheme = { "habamax" },
|
||||
},
|
||||
ui = {
|
||||
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
|
||||
border = "none",
|
||||
|
@ -78,6 +84,8 @@ function M.setup(spec, opts)
|
|||
M.spec = spec
|
||||
M.options = vim.tbl_deep_extend("force", M.defaults, opts or {})
|
||||
M.options.performance.cache = require("lazy.core.cache")
|
||||
table.insert(M.options.install.colorscheme, "habamax")
|
||||
|
||||
M.root = M.options.package.path .. "/pack/" .. M.options.package.name .. "/opt"
|
||||
|
||||
if M.options.performance.reset_packpath then
|
||||
|
|
|
@ -9,8 +9,13 @@ M.init_done = false
|
|||
|
||||
function M.setup()
|
||||
-- install missing plugins
|
||||
if Config.options.install_missing then
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue