feat(windows_terminal): add Windows Terminal colors (#315)

This commit is contained in:
Sven Grunewaldt
2023-02-28 10:02:44 +01:00
committed by GitHub
parent a0abe53df5
commit 85a833fa63
6 changed files with 141 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ function M.setup()
delta = "gitconfig",
terminator = "conf",
prism = "js",
windows_terminal = "json",
}
-- map of style to style name
local styles = {

View File

@@ -0,0 +1,40 @@
local util = require("tokyonight.util")
local M = {}
--- @param colors ColorScheme
function M.generate(colors)
local windows_terminal = util.template([[
# Add the following object to your Windows Terminal configuration
# https://learn.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes#creating-your-own-color-scheme
{
"background": "${bg}",
"black": "${black}",
"blue": "${blue}",
"brightBlack": "${terminal_black}",
"brightBlue": "${blue}",
"brightCyan": "${cyan}",
"brightGreen": "${green}",
"brightPurple": "${purple}",
"brightRed": "${red}",
"brightWhite": "${fg}",
"brightYellow": "${yellow}",
"cursorColor": "${fg}",
"cyan": "${cyan}",
"foreground": "${fg}",
"green": "${green}",
"name": "${_style_name}",
"purple": "${magenta}",
"red": "${red}",
"selectionBackground": "${bg_visual}",
"white": "${fg_dark}",
"yellow": "${yellow}"
}
]],
colors
)
return windows_terminal
end
return M