2023-01-18 14:06:08 +00:00
|
|
|
local util = require("tokyonight.util")
|
|
|
|
|
|
|
|
local M = {}
|
|
|
|
|
|
|
|
--- @param colors ColorScheme
|
|
|
|
function M.generate(colors)
|
|
|
|
return util.template(M.template, colors)
|
|
|
|
end
|
|
|
|
|
|
|
|
M.template = [[
|
|
|
|
module.exports = {
|
|
|
|
plain: {
|
|
|
|
color: "${fg}",
|
|
|
|
backgroundColor: "${bg}",
|
|
|
|
},
|
|
|
|
styles: [
|
|
|
|
{
|
|
|
|
types: ["prolog", "builtin"],
|
|
|
|
style: {
|
|
|
|
color: "${red}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["function"],
|
|
|
|
style: {
|
|
|
|
color: "${blue}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["symbol"],
|
|
|
|
style: {
|
|
|
|
color: "${blue1}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["punctuation"],
|
|
|
|
style: {
|
|
|
|
color: "${magenta}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["string", "char", "tag", "selector"],
|
|
|
|
style: {
|
|
|
|
color: "${green}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["keyword"],
|
|
|
|
style: {
|
2023-01-23 19:51:53 +00:00
|
|
|
color: "${purple}",
|
2023-01-18 14:06:08 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["operator"],
|
|
|
|
style: {
|
|
|
|
color: "${blue5}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["constant", "boolean"],
|
|
|
|
style: {
|
|
|
|
color: "${orange}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["variable"],
|
|
|
|
style: {
|
|
|
|
color: "${fg}",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["comment"],
|
|
|
|
style: {
|
|
|
|
color: "${comment}",
|
|
|
|
fontStyle: "italic",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
types: ["attr-name"],
|
|
|
|
style: {
|
|
|
|
color: "rgb(241, 250, 140)",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
]]
|
|
|
|
|
|
|
|
return M
|