lualine runner for each ness

This commit is contained in:
Michael Chris Lopez
2021-12-02 16:57:07 +08:00
parent be40f6b9e3
commit e1be7965a8

View File

@@ -73,14 +73,22 @@ local function specs_to_colors(specs)
} }
end end
---@diagnostic disable: undefined-global local ness_list = { "dim", "bright", "stark", "warm", "" }
-- selene: allow(undefined_variable)
run( for _, ness in ipairs(ness_list) do
local specs_name = string.len(ness) > 0 and "specs_" .. ness or "specs"
local specs = getfenv()[specs_name]
if specs then
---@diagnostic disable: undefined-global
-- selene: allow(undefined_variable)
run(
specs, specs,
specs_to_colors, specs_to_colors,
to_lualine, to_lualine,
{ prepend, "-- This file is auto-generated by shipwright.nvim" }, { prepend, "-- This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("lua/lualine/themes/%s.lua", name) } { overwrite, string.format("lua/lualine/themes/%s%s.lua", name, specs_name) }
) )
-- selene: deny(undefined_variable) -- selene: deny(undefined_variable)
---@diagnostic enable: undefined-global ---@diagnostic enable: undefined-global
end
end