2023-12-21 16:21:14 +01:00
|
|
|
local theme = vim.g.nix_theme
|
2023-01-22 01:22:38 +01:00
|
|
|
|
|
|
|
local M = {}
|
2023-12-21 16:21:14 +01:00
|
|
|
M.theme = theme
|
2023-01-22 01:22:38 +01:00
|
|
|
|
|
|
|
function M.theme_contains(name)
|
2023-12-21 16:21:14 +01:00
|
|
|
return string.find(theme.name, name) ~= nil
|
2023-01-22 01:22:38 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function M.variant(name)
|
|
|
|
-- +1 for 1-indexed strings and +1 for the space between name and variant
|
2023-12-21 16:21:14 +01:00
|
|
|
return string.lower(string.sub(theme.name, string.len(name) + 2))
|
2023-01-22 01:22:38 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|