Files
zenbones-theme/lua/zenbones/shipwright/runners/alacritty.lua
github-actions[bot] fb60cdc424 chore(build): format
2024-02-08 13:00:57 +00:00

49 lines
1.0 KiB
Lua

local helpers = require "shipwright.transform.helpers"
local base_template = [[
[colors.bright]
black = "$bright_black"
red = "$bright_red"
green = "$bright_green"
yellow = "$bright_yellow"
blue = "$bright_blue"
magenta = "$bright_magenta"
cyan = "$bright_cyan"
white = "$bright_white"
[colors.cursor]
cursor = "$cursor_bg"
text = "$cursor_fg"
[colors.normal]
black = "$black"
blue = "$blue"
cyan = "$cyan"
green = "$green"
magenta = "$magenta"
red = "$red"
white = "$white"
yellow = "$yellow"
[colors.primary]
background = "$bg"
foreground = "$fg"]]
local function alacritty_toml(colors)
local text = helpers.apply_template(base_template, colors)
return helpers.split_newlines(text)
end
---@diagnostic disable: undefined-global
-- selene: allow(undefined_variable)
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
alacritty_toml,
{ prepend, "# This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("extras/alacritty/%s.toml", name) }
)
-- selene: deny(undefined_variable)
---@diagnostic enable: undefined-global