🎨refactor(windows terminal): shipwright contribute (close #73) (#74)

* 🎨refactor(windows terminal): shipwright contribute (close #73)

* 🐞fix(windows terminal): typo
This commit is contained in:
Thuan Pham
2022-01-04 10:39:30 +07:00
committed by GitHub
parent 6e36feccb3
commit d2a63d8296
13 changed files with 131 additions and 151 deletions

View File

@@ -1,35 +1,15 @@
local template = [[{
"name": "$name",
"foreground": "$fg",
"background": "$bg",
"selectionBackground": "$selection_bg",
"cursorColor": "$cursor_bg",
"black": "$black",
"red": "$red",
"green": "$green",
"yellow": "$yellow",
"blue": "$blue",
"purple": "$magenta",
"cyan": "$cyan",
"white": "$white",
"brightBlack": "$bright_black",
"brightRed": "$bright_red",
"brightGreen": "$bright_green",
"brightYellow": "$bright_yellow",
"brightBlue": "$bright_blue",
"brightPurple": "$bright_magenta",
"brightCyan": "$bright_cyan",
"brightWhite": "$bright_white"
}]]
local helpers = require "shipwright.transform.helpers"
---@diagnostic disable: undefined-global
-- selene: allow(undefined_variable)
run({ specs, p, term }, transform.colorscheme_to_term_colors, function(colors)
local values = vim.tbl_extend("keep", colors, { name = name })
local text = helpers.apply_template(template, values)
return { text }
end, { overwrite, string.format("extras/windows_terminal/%s.json", name) })
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
function(colors)
return vim.tbl_extend("keep", colors, {
name = name,
})
end,
contrib.windows_terminal,
{ overwrite, string.format("extras/windows_terminal/%s.json", name) }
)
-- selene: deny(undefined_variable)
---@diagnostic enable: undefined-global