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.
This commit is contained in:
lbonn 2024-01-16 13:50:39 +01:00
commit b96501de77

View file

@ -210,7 +210,9 @@ function M.setup(opts)
if type(M.options.spec) == "string" then if type(M.options.spec) == "string" then
M.options.spec = { import = M.options.spec } M.options.spec = { import = M.options.spec }
end 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.root = Util.norm(M.options.root)
M.options.dev.path = Util.norm(M.options.dev.path) M.options.dev.path = Util.norm(M.options.dev.path)