Skip to content

Commit a6c8fe1

Browse files
committed
feat(extras): add prism colorscheme
1 parent 3eb5b07 commit a6c8fe1

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

lua/astrotheme/extras/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ M.extras = {
2323
kitty = { ext = "conf", url = "https://sw.kovidgoyal.net/kitty/conf.html", label = "Kitty" },
2424
lazygit = { ext = "yml", url = "https://github.com/jesseduffield/lazygit", label = "Lazygit" },
2525
lua = { ext = "lua", url = "https://www.lua.org", label = "Lua Table for testing" },
26+
prism = { ext = "js", url = "https://prismjs.com", label = "Prism" },
2627
slack = {ext = "txt", url = "https://slack.com", label = "Slack"},
2728
spotify_player = {ext = "toml", url = "https://github.com/aome510/spotify-player", label = "Spotify Player"},
2829
st = {ext = "h", url = "https://st.suckless.org/", label = "simple terminal"},

lua/astrotheme/extras/prism.lua

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
local util = require "astrotheme.extras"
2+
3+
local M = {}
4+
5+
--- @param colors AstroThemePalette
6+
function M.generate(colors)
7+
return util.template(
8+
[[
9+
module.exports = {
10+
plain: {
11+
color: "${syntax.text}",
12+
backgroundColor: "${ui.base}",
13+
},
14+
styles: [
15+
{
16+
types: ["prolog", "builtin"],
17+
style: {
18+
color: "${syntax.red}",
19+
},
20+
},
21+
{
22+
types: ["function", "symbol", "tag"],
23+
style: {
24+
color: "${syntax.blue}",
25+
},
26+
},
27+
{
28+
types: ["punctuation", "variable"],
29+
style: {
30+
color: "${syntax.text}",
31+
},
32+
},
33+
{
34+
types: ["string", "char", "selector"],
35+
style: {
36+
color: "${syntax.green}",
37+
},
38+
},
39+
{
40+
types: ["keyword", "operator"],
41+
style: {
42+
color: "${syntax.purple}",
43+
},
44+
},
45+
{
46+
types: ["constant", "boolean", "attr-name"],
47+
style: {
48+
color: "${syntax.yellow}",
49+
},
50+
},
51+
{
52+
types: ["comment"],
53+
style: {
54+
color: "${syntax.comment}",
55+
fontStyle: "italic",
56+
},
57+
},
58+
],
59+
};
60+
]],
61+
colors
62+
)
63+
end
64+
65+
return M

0 commit comments

Comments
 (0)