1
Fork 0
satellite/home/features/neovim/config/lua/my/plugins/themes/helpers.lua

15 lines
311 B
Lua
Raw Normal View History

2023-01-22 01:22:38 +01:00
local theme = require("nix.theme").name
local M = {}
function M.theme_contains(name)
return string.find(theme, name) ~= nil
end
function M.variant(name)
-- +1 for 1-indexed strings and +1 for the space between name and variant
return string.lower(string.sub(theme, string.len(name) + 2))
end
return M