feat(extras): added prism.js themes

This commit is contained in:
Folke Lemaitre
2023-01-18 15:06:08 +01:00
parent 039b304bf6
commit 14ca396af0
6 changed files with 395 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
module.exports = {
plain: {
color: "#3760bf",
backgroundColor: "#e1e2e7",
},
styles: [
{
types: ["prolog", "builtin"],
style: {
color: "#f52a65",
},
},
{
types: ["function"],
style: {
color: "#2e7de9",
},
},
{
types: ["symbol"],
style: {
color: "#188092",
},
},
{
types: ["punctuation"],
style: {
color: "#9854f1",
},
},
{
types: ["string", "char", "tag", "selector"],
style: {
color: "#587539",
},
},
{
types: ["keyword"],
style: {
color: "#9854f1",
fontStyle: "italic",
},
},
{
types: ["operator"],
style: {
color: "#006a83",
},
},
{
types: ["constant", "boolean"],
style: {
color: "#b15c00",
},
},
{
types: ["variable"],
style: {
color: "#3760bf",
},
},
{
types: ["comment"],
style: {
color: "#848cb5",
fontStyle: "italic",
},
},
{
types: ["attr-name"],
style: {
color: "rgb(241, 250, 140)",
},
},
],
};

View File

@@ -0,0 +1,76 @@
module.exports = {
plain: {
color: "#c8d3f5",
backgroundColor: "#222436",
},
styles: [
{
types: ["prolog", "builtin"],
style: {
color: "#ff757f",
},
},
{
types: ["function"],
style: {
color: "#82aaff",
},
},
{
types: ["symbol"],
style: {
color: "#65bcff",
},
},
{
types: ["punctuation"],
style: {
color: "#c099ff",
},
},
{
types: ["string", "char", "tag", "selector"],
style: {
color: "#c3e88d",
},
},
{
types: ["keyword"],
style: {
color: "#c099ff",
fontStyle: "italic",
},
},
{
types: ["operator"],
style: {
color: "#89ddff",
},
},
{
types: ["constant", "boolean"],
style: {
color: "#ff966c",
},
},
{
types: ["variable"],
style: {
color: "#c8d3f5",
},
},
{
types: ["comment"],
style: {
color: "#636da6",
fontStyle: "italic",
},
},
{
types: ["attr-name"],
style: {
color: "rgb(241, 250, 140)",
},
},
],
};

View File

@@ -0,0 +1,76 @@
module.exports = {
plain: {
color: "#c0caf5",
backgroundColor: "#1a1b26",
},
styles: [
{
types: ["prolog", "builtin"],
style: {
color: "#f7768e",
},
},
{
types: ["function"],
style: {
color: "#7aa2f7",
},
},
{
types: ["symbol"],
style: {
color: "#2ac3de",
},
},
{
types: ["punctuation"],
style: {
color: "#bb9af7",
},
},
{
types: ["string", "char", "tag", "selector"],
style: {
color: "#9ece6a",
},
},
{
types: ["keyword"],
style: {
color: "#bb9af7",
fontStyle: "italic",
},
},
{
types: ["operator"],
style: {
color: "#89ddff",
},
},
{
types: ["constant", "boolean"],
style: {
color: "#ff9e64",
},
},
{
types: ["variable"],
style: {
color: "#c0caf5",
},
},
{
types: ["comment"],
style: {
color: "#565f89",
fontStyle: "italic",
},
},
{
types: ["attr-name"],
style: {
color: "rgb(241, 250, 140)",
},
},
],
};

View File

@@ -0,0 +1,76 @@
module.exports = {
plain: {
color: "#c0caf5",
backgroundColor: "#24283b",
},
styles: [
{
types: ["prolog", "builtin"],
style: {
color: "#f7768e",
},
},
{
types: ["function"],
style: {
color: "#7aa2f7",
},
},
{
types: ["symbol"],
style: {
color: "#2ac3de",
},
},
{
types: ["punctuation"],
style: {
color: "#bb9af7",
},
},
{
types: ["string", "char", "tag", "selector"],
style: {
color: "#9ece6a",
},
},
{
types: ["keyword"],
style: {
color: "#bb9af7",
fontStyle: "italic",
},
},
{
types: ["operator"],
style: {
color: "#89ddff",
},
},
{
types: ["constant", "boolean"],
style: {
color: "#ff9e64",
},
},
{
types: ["variable"],
style: {
color: "#c0caf5",
},
},
{
types: ["comment"],
style: {
color: "#565f89",
fontStyle: "italic",
},
},
{
types: ["attr-name"],
style: {
color: "rgb(241, 250, 140)",
},
},
],
};

View File

@@ -28,6 +28,7 @@ function M.setup()
sublime = "tmTheme", sublime = "tmTheme",
delta = "gitconfig", delta = "gitconfig",
terminator = "conf", terminator = "conf",
prism = "js",
} }
-- map of style to style name -- map of style to style name
local styles = { local styles = {
@@ -38,6 +39,7 @@ function M.setup()
} }
for extra, ext in pairs(extras) do for extra, ext in pairs(extras) do
package.loaded["tokyonight.extra." .. extra] = nil
local plugin = require("tokyonight.extra." .. extra) local plugin = require("tokyonight.extra." .. extra)
for style, style_name in pairs(styles) do for style, style_name in pairs(styles) do
config.setup({ style = style }) config.setup({ style = style })

View File

@@ -0,0 +1,89 @@
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: {
color: "${magenta}",
fontStyle: "italic",
},
},
{
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