From b96501de774d3852ebbda971bceb00ceffbbf153 Mon Sep 17 00:00:00 2001 From: lbonn Date: Tue, 16 Jan 2024 13:50:39 +0100 Subject: [PATCH] fix(loader): respect empty colorscheme (#713) This gives the option to not override default colorscheme during plugin installation by using the configuration: ``` { install = { colorscheme = {}, }, } ``` If the user specifies a scheme or keeps the default, we will fall back to 'habamax' as before. --- lua/lazy/core/config.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 1fbf3ef..8b29937 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -210,7 +210,9 @@ function M.setup(opts) if type(M.options.spec) == "string" then M.options.spec = { import = M.options.spec } end - table.insert(M.options.install.colorscheme, "habamax") + if #M.options.install.colorscheme > 0 then + table.insert(M.options.install.colorscheme, "habamax") + end M.options.root = Util.norm(M.options.root) M.options.dev.path = Util.norm(M.options.dev.path)