feat(extras): added prism.js themes
This commit is contained in:
@@ -28,6 +28,7 @@ function M.setup()
|
||||
sublime = "tmTheme",
|
||||
delta = "gitconfig",
|
||||
terminator = "conf",
|
||||
prism = "js",
|
||||
}
|
||||
-- map of style to style name
|
||||
local styles = {
|
||||
@@ -38,6 +39,7 @@ function M.setup()
|
||||
}
|
||||
|
||||
for extra, ext in pairs(extras) do
|
||||
package.loaded["tokyonight.extra." .. extra] = nil
|
||||
local plugin = require("tokyonight.extra." .. extra)
|
||||
for style, style_name in pairs(styles) do
|
||||
config.setup({ style = style })
|
||||
|
||||
89
lua/tokyonight/extra/prism.lua
Normal file
89
lua/tokyonight/extra/prism.lua
Normal 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
|
||||
Reference in New Issue
Block a user