style: fixed formatting

This commit is contained in:
Folke Lemaitre
2022-09-05 12:06:20 +02:00
parent 941f7a87ac
commit f2a76d28a2
4 changed files with 53 additions and 53 deletions

View File

@@ -5,36 +5,36 @@ local util = require("tokyonight.util")
local tokyonight = {}
tokyonight.normal = {
left = {{ colors.black, colors.blue }, { colors.blue, colors.fg_gutter }},
middle = {{ colors.fg, colors.bg_statusline }},
right = {{ colors.black, colors.blue }, { colors.blue, colors.fg_gutter }},
error = {{ colors.black, colors.error }},
warning = {{ colors.black, colors.warning }},
left = { { colors.black, colors.blue }, { colors.blue, colors.fg_gutter } },
middle = { { colors.fg, colors.bg_statusline } },
right = { { colors.black, colors.blue }, { colors.blue, colors.fg_gutter } },
error = { { colors.black, colors.error } },
warning = { { colors.black, colors.warning } },
}
tokyonight.insert = {
left = {{ colors.black, colors.green }, { colors.blue, colors.bg }},
left = { { colors.black, colors.green }, { colors.blue, colors.bg } },
}
tokyonight.visual = {
left = {{ colors.black, colors.magenta }, { colors.blue, colors.bg }},
left = { { colors.black, colors.magenta }, { colors.blue, colors.bg } },
}
tokyonight.replace = {
left = {{ colors.black, colors.red }, { colors.blue, colors.bg }},
left = { { colors.black, colors.red }, { colors.blue, colors.bg } },
}
tokyonight.inactive = {
left = {{ colors.blue, colors.bg_statusline }, {colors.dark3, colors.bg }},
middle = {{ colors.fg_gutter, colors.bg_statusline }},
right = {{ colors.fg_gutter, colors.bg_statusline }, {colors.dark3, colors.bg }},
left = { { colors.blue, colors.bg_statusline }, { colors.dark3, colors.bg } },
middle = { { colors.fg_gutter, colors.bg_statusline } },
right = { { colors.fg_gutter, colors.bg_statusline }, { colors.dark3, colors.bg } },
}
tokyonight.tabline = {
left = {{ colors.dark3, colors.bg_highlight }, {colors.dark3, colors.bg }},
middle = {{ colors.fg_gutter, colors.bg_statusline }},
right = {{ colors.fg_gutter, colors.bg_statusline }, {colors.dark3, colors.bg }},
tabsel = {{ colors.blue, colors.fg_gutter }, { colors.dark3, colors.bg }},
left = { { colors.dark3, colors.bg_highlight }, { colors.dark3, colors.bg } },
middle = { { colors.fg_gutter, colors.bg_statusline } },
right = { { colors.fg_gutter, colors.bg_statusline }, { colors.dark3, colors.bg } },
tabsel = { { colors.blue, colors.fg_gutter }, { colors.dark3, colors.bg } },
}
if vim.o.background == "light" then

View File

@@ -3,41 +3,41 @@ package.path = "./lua/?/init.lua;./lua/?.lua"
local config = require("tokyonight.config")
local function write(str, fileName)
print("[write] extra/" .. fileName)
local file = io.open("extras/" .. fileName, "w")
file:write(str)
file:close()
print("[write] extra/" .. fileName)
local file = io.open("extras/" .. fileName, "w")
file:write(str)
file:close()
end
-- map of plugin name to plugin extension
local extras = {
kitty = "conf",
fish = "fish",
alacritty = "yml",
wezterm = "toml",
tmux = "tmux",
xresources = "Xresources",
xfceterm = "theme",
foot = "ini",
tilix = "json",
kitty = "conf",
fish = "fish",
alacritty = "yml",
wezterm = "toml",
tmux = "tmux",
xresources = "Xresources",
xfceterm = "theme",
foot = "ini",
tilix = "json",
}
-- map of style to style name
local styles = {
storm = " Storm",
night = "",
day = " Day",
local styles = {
storm = " Storm",
night = "",
day = " Day",
}
for extra, ext in pairs(extras) do
local plugin = require("tokyonight.extra." .. extra)
for style, style_name in pairs(styles) do
config.style = style
config = config or require("tokyonight.config")
config.transform_colors = true
local colors = require("tokyonight.colors").setup(config)
local fname = extra .. "_tokyonight_" .. style .. "." .. ext
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name
write(plugin.generate(colors), fname)
end
local plugin = require("tokyonight.extra." .. extra)
for style, style_name in pairs(styles) do
config.style = style
config = config or require("tokyonight.config")
config.transform_colors = true
local colors = require("tokyonight.colors").setup(config)
local fname = extra .. "_tokyonight_" .. style .. "." .. ext
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name
write(plugin.generate(colors), fname)
end
end

View File

@@ -4,8 +4,8 @@ local M = {}
-- @param colors ColorScheme
function M.generate(colors)
local xfceterm = util.template(
[[
local xfceterm = util.template(
[[
[Scheme]
Name=TokyoNight Colors
ColorBackground=${bg}
@@ -16,9 +16,9 @@ ColorSelection=${fg}
ColorPalette=${black};${red};${green};${yellow};${blue};${magenta};${cyan};${fg_dark};${terminal_black};${red};${green};${yellow};${blue};${magenta};${cyan};${fg}
]],
colors
)
return xfceterm
colors
)
return xfceterm
end
return M

View File

@@ -4,8 +4,8 @@ local M = {}
--- @param colors ColorScheme
function M.generate(colors)
local xr = util.template(
[[
local xr = util.template(
[[
! TokyoNight colors for Xresources
*background: ${bg}
@@ -30,9 +30,9 @@ function M.generate(colors)
*color15: ${fg}
]],
colors
)
return xr
colors
)
return xr
end
return M