Skip to content

Commit 6bdac76

Browse files
committed
feat(extras): add lua to extras
1 parent 35eba15 commit 6bdac76

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

lua/astrotheme/extras/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ local M = {}
99
-- stylua: ignore
1010
M.extras = {
1111
-- Keep all entries here aligned by the first `=` sign
12-
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" },
12+
lua = { ext = "lua", url = "https://www.lua.org", label = "Lua Table for testing" },
1313
vim = { ext = "vim", url = "https://vimhelp.org/", label = "Vim", subdir = "colors"},
14+
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" },
1415
}
1516

1617
function M.setup()

lua/astrotheme/extras/lua.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
local M = {}
2+
3+
--- @param colors AstroThemePalette
4+
--- @param highlights table<string, vim.api.keyset.highlight>
5+
function M.generate(colors, highlights)
6+
colors = vim.deepcopy(colors)
7+
colors._upstream_url = nil
8+
colors._style_name = nil
9+
10+
local ret = "local colors = "
11+
.. vim.inspect(colors)
12+
.. "\n\nlocal highlights = "
13+
.. vim.inspect(vim.deepcopy(highlights, true))
14+
.. "\n"
15+
return ret
16+
end
17+
18+
return M

0 commit comments

Comments
 (0)