From f2a76d28a2404332f77ec9a674c8ab26d09574c0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 5 Sep 2022 12:06:20 +0200 Subject: [PATCH] style: fixed formatting --- lua/lightline/colorscheme/tokyonight.lua | 30 ++++++------- lua/tokyonight/extra/init.lua | 56 ++++++++++++------------ lua/tokyonight/extra/xfceterm.lua | 10 ++--- lua/tokyonight/extra/xresources.lua | 10 ++--- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/lua/lightline/colorscheme/tokyonight.lua b/lua/lightline/colorscheme/tokyonight.lua index faa15bf..e37694b 100644 --- a/lua/lightline/colorscheme/tokyonight.lua +++ b/lua/lightline/colorscheme/tokyonight.lua @@ -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 diff --git a/lua/tokyonight/extra/init.lua b/lua/tokyonight/extra/init.lua index 5049e55..1011df2 100644 --- a/lua/tokyonight/extra/init.lua +++ b/lua/tokyonight/extra/init.lua @@ -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 diff --git a/lua/tokyonight/extra/xfceterm.lua b/lua/tokyonight/extra/xfceterm.lua index cdfad8f..63ad2b1 100644 --- a/lua/tokyonight/extra/xfceterm.lua +++ b/lua/tokyonight/extra/xfceterm.lua @@ -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 diff --git a/lua/tokyonight/extra/xresources.lua b/lua/tokyonight/extra/xresources.lua index bf51bda..876e876 100644 --- a/lua/tokyonight/extra/xresources.lua +++ b/lua/tokyonight/extra/xresources.lua @@ -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